简体   繁体   English

WPF FrameworkPropertyMetaData 日志 — 这有什么意义?

[英]WPF FrameworkPropertyMetaData Journal — What is the point of this?

Basically, just as the title asks:基本上,正如标题所要求的:

What is the point of the Journal property? Journal 属性的意义何在? MSDN doesn't really explain it's actual usefulness. MSDN 并没有真正解释它的实际用途。

This is nicely explained by this blog post , or on the official MSDN page .这篇文或官方MSDN 页面很好地解释了这一点。

To summarize though:总结一下:

Windows Presentation Foundation (WPF) supports browser-style navigation that can be used in two types of applications: standalone applications and XAML browser applications (XBAPs). Windows Presentation Foundation (WPF) 支持浏览器式导航,可用于两种类型的应用程序:独立应用程序和 XAML 浏览器应用程序 (XBAP)。 To package content for navigation, WPF provides the Page class.对package内容进行导航,WPF提供页面class。 You can navigate from one Page to another declaratively, by using a Hyperlink, or programmatically, by using the NavigationService.您可以使用超链接以声明方式从一个页面导航到另一个页面,也可以使用 NavigationService 以编程方式导航。 WPF uses the journal to remember pages that have been navigated from and to navigate back to them. WPF 使用日志来记住已导航的页面并导航回它们。
... ...
If you need to remember small pieces of state across Page navigations, you can use dependency properties (see DependencyProperty) that are configured with the FrameworkPropertyMetadata.Journal metadata flag.如果您需要跨页面导航记住 state 的小片段,您可以使用通过 FrameworkPropertyMetadata.Journal 元数据标志配置的依赖属性(请参阅 DependencyProperty)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM