JournalEntry Class

JournalEntry Class


Represents an entry in either back or forward navigation history.

Namespace:   System.Windows.Navigation
Assembly:  PresentationFramework (in PresentationFramework.dll)


public class JournalEntry : DependencyObject, ISerializable

System_CAPS_protmethodJournalEntry(SerializationInfo, StreamingContext)

This API supports the product infrastructure and is not intended to be used directly from your code. Initializes a new instance of the JournalEntry class.


Gets or sets the CustomContentState object that is associated with this journal entry.


Gets the DependencyObjectType that wraps the CLR type of this instance. (Inherited from DependencyObject.)


Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)


Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)


Gets or sets the name of the journal entry.


Gets or sets the URI of the content that was navigated to.


Gets or sets a value that indicates whether the content of a journal entry is either retained or re-created when navigated to in navigation history.


Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)


Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier. (Inherited from DependencyObject.)


Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey. (Inherited from DependencyObject.)


Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.(Inherited from DependencyObject.)


Determines whether a provided DependencyObject is equivalent to the current DependencyObject.(Inherited from DependencyObject.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Gets a hash code for this DependencyObject.(Inherited from DependencyObject.)


Returns the KeepAlive attached property of the journal entry for the specified element.


Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject. (Inherited from DependencyObject.)


Gets the Name attached property of the journal entry for the specified element.

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

Called when this object is serialized.


Gets the Type of the current instance.(Inherited from Object.)


Returns the current effective value of a dependency property on this instance of a DependencyObject. (Inherited from DependencyObject.)


Re-evaluates the effective value for the specified dependency property(Inherited from DependencyObject.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data. (Inherited from DependencyObject.)


Returns the local value of a dependency property, if it exists. (Inherited from DependencyObject.)

System_CAPS_pubmethodSetCurrentValue(DependencyProperty, Object)

Sets the value of a dependency property without changing its value source. (Inherited from DependencyObject.)

System_CAPS_pubmethodSystem_CAPS_staticSetKeepAlive(DependencyObject, Boolean)

Sets the KeepAlive attached property of the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetName(DependencyObject, String)

Sets the Name attached property of the specified element.

System_CAPS_pubmethodSetValue(DependencyProperty, Object)

Sets the local value of a dependency property, specified by its dependency property identifier. (Inherited from DependencyObject.)

System_CAPS_pubmethodSetValue(DependencyPropertyKey, Object)

Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property. (Inherited from DependencyObject.)


Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.(Inherited from DependencyObject.)


Returns a string that represents the current object.(Inherited from Object.)


Enforces that the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)


Identifies the KeepAlive attached property.


Identifies the Name attached property.

Windows Presentation Foundation (WPF) implements a navigation history service that stores one entry for each piece of content that has been previously navigated to, just like navigation history in Microsoft Internet Explorer. Navigation history comprises two stacks, one that remembers back navigation history, and one that remembers forward navigation history.

An entry for the current item is added to back navigation history when a forward navigation occurs. This occurs in the following situations:

Likewise, an entry for the current item is added to forward navigation history before a back navigation occurs, which happens when:

Each entry in back and forward navigation history is an instance of the JournalEntry class.

Each JournalEntry object encapsulates information about a particular navigation, including a name for the entry (Name), whether the entry is kept alive (KeepAlive) and the uniform resource identifier (URI) for the content that is navigated to (Source).

You can retrieve all the JournalEntry objects in back navigation history by enumerating the NavigationWindow.BackStack or Frame.BackStack properties. For forward navigation history, you can retrieve all the JournalEntry objects by enumerating the NavigationWindow.ForwardStack or Frame.ForwardStack properties.

If you need to remove the most recent JournalEntry object from back navigation history, to prevent navigation to it, for example, you can call the RemoveBackEntry method (NavigationService.RemoveBackEntry, NavigationWindow.RemoveBackEntry, Frame.RemoveBackEntry), which removes the JournalEntry object and returns a reference to it.

You cannot add JournalEntry objects to navigation history, however, because you can neither instantiate nor derive from JournalEntry, and because no type implements a member to do so. However, you can add custom CustomContentState objects to back navigation history by calling the AddBackEntry method (AddBackEntry, AddBackEntry, AddBackEntry); NavigationService adds the CustomContentState object to an internally-created JournalEntry object, which is then added to the back navigation history.

The following example shows how to retrieve the most recent JournalEntry object from the back navigation stack to get the Name and Source property values.

void removeJournalEntryButton_Click(object sender, RoutedEventArgs e)
    // If there are journal entries on the back navigation stack
    if (this.NavigationService.CanGoBack)
        // Remove and get the most recent entry on the back navigation stack
        JournalEntry journalEntry = this.NavigationService.RemoveBackEntry();

        string name = journalEntry.Name;
        string uri = journalEntry.Source.OriginalString;
        MessageBox.Show(name + " [" + uri + "] removed from back navigation.");

.NET Framework
Available since 3.0
Windows Phone Silverlight
Available since 7.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft