NavigatingCancelEventArgs NavigatingCancelEventArgs NavigatingCancelEventArgs Class

Provides data for the OnNavigatingFrom(NavigatingCancelEventArgs) callback that can be used to cancel a navigation request from origination.

Syntax

Declaration

public sealed class NavigatingCancelEventArgspublic sealed class NavigatingCancelEventArgsPublic NotInheritable Class NavigatingCancelEventArgs

Properties summary

Specifies whether a pending navigation should be canceled.

Gets the value of the mode parameter from the originating Navigate(TypeName, Object, NavigationTransitionInfo) call.

Gets a value that indicates the animated transition associated with the navigation.

Gets the navigation parameter associated with this navigation.

Gets the value of the SourcePageType parameter from the originating Navigate(TypeName, Object, NavigationTransitionInfo) call.

Properties

  • Cancel
    Cancel
    Cancel
    Cancel

    Specifies whether a pending navigation should be canceled.

    public bool Cancel { get; set; }public bool Cancel { get; set; }Public ReadWrite Property Cancel As boolpublic bool Cancel { get; set; }

    Property Value

    • bool
      bool
      bool

      true to cancel the pending cancelable navigation; false to continue with navigation.

  • NavigationMode
    NavigationMode
    NavigationMode
    NavigationMode

    Gets the value of the mode parameter from the originating Navigate(TypeName, Object, NavigationTransitionInfo) call.

    public NavigationMode NavigationMode { get; }public NavigationMode NavigationMode { get; }Public ReadOnly Property NavigationMode As NavigationModepublic NavigationMode NavigationMode { get; }

    Property Value

  • NavigationTransitionInfo
    NavigationTransitionInfo
    NavigationTransitionInfo
    NavigationTransitionInfo

    Gets a value that indicates the animated transition associated with the navigation.

    public NavigationTransitionInfo NavigationTransitionInfo { get; }public NavigationTransitionInfo NavigationTransitionInfo { get; }Public ReadOnly Property NavigationTransitionInfo As NavigationTransitionInfopublic NavigationTransitionInfo NavigationTransitionInfo { get; }

    Property Value

  • Parameter
    Parameter
    Parameter
    Parameter

    Gets the navigation parameter associated with this navigation.

    public object Parameter { get; }public object Parameter { get; }Public ReadOnly Property Parameter As objectpublic object Parameter { get; }

    Property Value

    • object
      object
      object

      The navigation parameter.

  • SourcePageType
    SourcePageType
    SourcePageType
    SourcePageType

    Gets the value of the SourcePageType parameter from the originating Navigate(TypeName, Object, NavigationTransitionInfo) call.

    public TypeName SourcePageType { get; }public Type SourcePageType { get; }Public ReadOnly Property SourcePageType As Typepublic TypeName SourcePageType { get; }

    Property Value

    Remarks

    Note

    If you are programming using a Microsoft .NET language (C# or Microsoft Visual Basic), the TypeName type projects as System.Type. If you're using Visual C++ component extensions (C++/CX)), this is a TypeName helper struct.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Navigation.dll