'Big button in navigation view. WinUI / xaml

Does anyone know how to make a big button with subtext and a picture in a navigation panel (using xaml)? Like in the Windows 11 settings app.

Like this...



Solution 1:[1]

You can customise the content of a button with <Button.Context> and the Width with the Width property.

Since a button can only have one piece of content, it is best to put everything you need in a StackPanel or Grid.

     <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
    <Button x:Name="BigButton" Width="300">
        <Button.Content>
            <Grid ColumnDefinitions="1*,3*">
                <Image Source="WHERE YOU IMAGE IS"/>
                <StackPanel Orientation="Vertical"
                            Grid.Column="1">
                    <TextBlock FontWeight="Bold" Text="Joe Wood"/>
                    <TextBlock Text="Managing Director"/>
                </StackPanel>
            </Grid>
        </Button.Content></Button>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1