Back to Devexpress

NavigationFrame.SelectedPage Property

windowsforms-devexpress-dot-xtrabars-dot-navigation-dot-navigationframe-a9563f3e.md

latest2.8 KB
Original Source

NavigationFrame.SelectedPage Property

Gets or sets the currently selected page.

Namespace : DevExpress.XtraBars.Navigation

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(null)]
[DXCategory("Behavior")]
public NavigationPage SelectedPage { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(Nothing)>
Public Property SelectedPage As NavigationPage

Property Value

TypeDefault
NavigationPagenull

Remarks

Attempts to change the SelectedPage raise the NavigationFrame.SelectedPageChanging event, which can be canceled to restrict navigating to this page. If not canceled, the NavigationFrame.SelectedPageChanged event occurs.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedPage property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-generate-skin-palettes-with-ai/CS/DevExpress.AI.WinForms.AIGeneratePalette.Demo/AccordionShellForm.cs#L41

csharp
void OnSelectedAccordionElementChanged(object sender, SelectedElementChangedEventArgs e) {
    viewNavigationFrame.SelectedPage = (NavigationPage)viewNavigationFrame.Pages.First(p => p.Tag == e.Element.Tag);
}

See Also

SelectedPageChanging

SelectedPageChanged

NavigationFrame Class

NavigationFrame Members

DevExpress.XtraBars.Navigation Namespace