OptionsDisplayItem

April 8, 2026 ยท View on GitHub

A settings-style row control with a header, optional description, icon, action button slot, navigation chevron, and expandable content area. Used throughout the example app for settings pages.

Properties

PropertyTypeDescription
HeaderstringPrimary label
DescriptionstringSecondary text below the header
IconGeometryIcon shown on the left
NavigatesboolShows a right chevron โ€” makes the row look tappable
NavigationCommandICommand?Command invoked when the row is clicked (when Navigates=True)
ActionButtonControlControl placed on the right (toggle, combobox, button, etc.)
ExpandsboolReveals hidden Content when clicked
IsExpandedboolCurrent expanded state
Contentobject?Content shown when expanded

Simple row

<OptionsDisplayItem Header="Notifications"
                    Description="Manage notification preferences"
                    Icon="{DynamicResource BellOutline}" />

With action control

<OptionsDisplayItem Header="Dark mode"
                    Icon="{DynamicResource WeatherNight}">
    <OptionsDisplayItem.ActionButton>
        <ToggleSwitch IsChecked="{Binding IsDarkMode}" />
    </OptionsDisplayItem.ActionButton>
</OptionsDisplayItem>

<OptionsDisplayItem Header="Language">
    <OptionsDisplayItem.ActionButton>
        <ComboBox ItemsSource="{Binding Languages}"
                  SelectedItem="{Binding SelectedLanguage}"
                  MinWidth="150" />
    </OptionsDisplayItem.ActionButton>
</OptionsDisplayItem>
<OptionsDisplayItem Header="Account"
                    Description="Manage your account settings"
                    Icon="{DynamicResource AccountOutline}"
                    Navigates="True"
                    NavigationCommand="{Binding GoToAccountCommand}" />

Expandable row

<OptionsDisplayItem Header="Advanced options"
                    Description="Click to expand"
                    Expands="True">
    <OptionsDisplayItem.Content>
        <StackPanel Spacing="8" Margin="0 8 0 0">
            <CheckBox Content="Enable feature A" IsChecked="{Binding FeatureA}" />
            <CheckBox Content="Enable feature B" IsChecked="{Binding FeatureB}" />
        </StackPanel>
    </OptionsDisplayItem.Content>
</OptionsDisplayItem>

Events

item.AddHandler(OptionsDisplayItem.NavigationRequestedEvent, (_, _) =>
{
    // navigate somewhere
});