Skip to main content

NavigationButton.NavigationTarget Property

Gets or sets the frame that manages the navigation, invoked by the current NavigationButton.

Namespace: DevExpress.Xpf.WindowsUI

Assembly: DevExpress.Xpf.Controls.v22.2.dll

NuGet Package: DevExpress.Wpf.Controls


public object NavigationTarget { get; set; }

Property Value

Type Description

An Object that is the NavigationFrame, which manages the navigation invoked by the current NavigationButton.


Typically, navigation within a WPF WindowsUI application is managed by a NavigationFrame. The initial (root) application screen is specified via its NavigationFrame.Source property. To navigate through views, you can use NavigationButtons and specify their NavigationButton.NavigateTo properties. If these buttons are located inside a NavigationFrame, you do not need to the specify the NavigationTarget property manually.

The mark-up below illustrates the different situation.

<Window xmlns:dxwui=""  x:Class="NavigationButtons.MainWindow"
        . . .
        Title="MainWindow" d:DesignHeight="300" d:DesignWidth="300">
        <dxwui:NavigationFrame x:Name="frame1" Source="MainView" AnimationType="SlideHorizontal"/>
        <dxwui:NavigationButton Name="btn1" Width="200" Height="200" NavigateTo="myView">Navigate To The View</dxwui:NavigationButton>

In this example the NavigationButton is located outside the NavigationFrame and although its NavigationButton.NavigateTo property is specified, clicking this button will do nothing. In this case, you have to manually specify the NavigationTarget property to set the NavigationFrame that will manage the navigation.

<dxwui:NavigationButton Name="btn1" Width="200" Height="200" NavigateTo="myView" NavigationTarget="{Binding ElementName=frame1}">Navigate To The View</dxwui:NavigationButton>

The NavigationTarget property overrides the attached Navigation.NavigationTarget property, which used for all other UI elements except NavigationButtons.

<Button Name="btn1" Width="200" Height="200" dxwuin:Navigation.NavigateTo="myView" dxwuin:Navigation.NavigationTarget="{Binding ElementName=frame1}">Navigate To The View</Button>
See Also