Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 WPF 窗口和一个包含我大部分内容的窗口中的框架。在某些情况下,我将直接导航到带有框架的 URL,这将导致我的 frame.Currentsource 正确填充。但是,在其他情况下,我将创建一个页面对象,然后将该对象直接放在 frame.Navigate 方法中,但这会导致我的 frame.Currentsource 解析为 NULL。
如何确保我的框架始终具有有效的 frame.Currentsource 值?