Skip to main content

HamburgerMenuNavigationButton.SelectOnClick Property

Gets or sets whether the current button is selected with a click.

Namespace: DevExpress.UI.Xaml.Layout

Assembly: DevExpress.UI.Xaml.Layout.v21.2.dll

NuGet Package: DevExpress.Uwp.Controls

Declaration

public bool SelectOnClick { get; set; }

Property Value

Type Description
Boolean

true, if the current button is selected when clicked; otherwise, false. The default is true.

Remarks

Typically, the HamburgerMenuNavigationButton is used to navigate to a particular page in the application. To specify the page to which the current button navigates with a click, use its NavigationTargetType or NavigationTargetTypeName property. By default, when the button is clicked, it is selected and persists in the pushed state, indicating the currently selected page. You can get the currently selected button using the menu’s HamburgerMenu.SelectedItem property.

However, instead of navigating to an application page, you can perform custom actions with a click on the button. For this purpose, handle the button’s Click event, or use the Command property. In this use case, to prevent the button from being selected and persisting in the pushed state after it is clicked, set the SelectOnClick property to false. See an example below.

<Layout:HamburgerMenuNavigationButton Content="Close Window" Placement="Bottom" SelectOnClick="False" Command="{Binding CloseWindowCommand, Mode=OneTime}">
    <Layout:HamburgerMenuNavigationButton.Icon>
        <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE711;" />
    </Layout:HamburgerMenuNavigationButton.Icon>
</Layout:HamburgerMenuNavigationButton>
See Also