获取或设置 Frame 是负责管理自己的导航历史记录,还是将导航历史记录的管理工作交给父导航器 ( NavigationWindow 、 Frame ) 负责。
命名空间: System.Windows.Controls
程序集: PresentationFramework(在 PresentationFramework.dll 中)
用于 XAML 的 XMLNS:http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
程序集: PresentationFramework(在 PresentationFramework.dll 中)
用于 XAML 的 XMLNS:http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
属性值
类型:
System.Windows.Navigation.JournalOwnership
一个 JournalOwnership 值,该值指定 Frame 是否管理自己的日记。 默认值为 Automatic 。
一个 JournalOwnership 值,该值指定 Frame 是否管理自己的日记。 默认值为 Automatic 。
默认情况下,仅当无法找到包含自己的日记的父导航宿主 ( NavigationWindow 、 Frame ) 时, Frame 才会使用自己的导航历史记录(例如,如果承载 Frame 的内容由 Window 承载)。 若要强制 Frame 管理自己的导航历史记录,请将 JournalOwnership 设置为 OwnsJournal 。
下面的示例演示一个配置为使用自己的导航历史记录的 Frame 。
XAML页面
< Page xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " >
<!-- Frame that uses its own journal -->
< Frame JournalOwnership = " OwnsJournal " Source = " Page2.xaml " />
</ Page >