Frame.BackStack is a useful property in WPF applications: it's an IEnumerable for a frame's navigation history. In my experience, these back entries tend to be
JournalEntry instances.
JournalEntry.Name can help you find what Page is represented by the JournalEntry, but it is a little tricky to use in practice. Name can be one of four things:
- The attached Name attribute.
- Title.
- WindowTitle and the uniform resource identifier (URI) for the current page
- The uniform resource identifier (URI) for the current page.
(Source: JournalEntry.Name documentation on MSDN)
If you set x:Name for a page, the corresponding JournalEntry.Name will be that x:Name. Doing this allows you to (somewhat) reliably identify the JournalEntry's page.
No comments:
Post a Comment