Search code examples
c#xamluwpflyout

C# UWP Flyout cuts text


On the picture you can see that the text is cut.
The width of the flyout menu is long enough, but why is my text cut?

enter image description here

    <!--Button Optionen Flyout-->
    <Button x:Name="button_optionen_flyout" x:Uid="mainBT_Optionen" Content="Optionen" Height="42" Width="105" FontSize="20" Margin="22,429,0,0" VerticalAlignment="Top" IsEnabled = "False">
        <Button.Flyout>
            <MenuFlyout>
                <MenuFlyoutSubItem x:Uid="mainBT_Sprache" Text="Sprache" FontSize="20">
                    <ToggleMenuFlyoutItem x:Name="Sprache_DE" x:Uid="mainBT_Deutsch"  Text="Deutsch" FontSize="20" HorizontalAlignment="Left" Width="150" IsChecked="True" Click="Deutsch_Click"/>
                    <ToggleMenuFlyoutItem x:Name="Sprache_EN" x:Uid="mainBT_Englisch" Text="Englisch" FontSize="20" HorizontalAlignment="Left" Width="150" IsChecked="False" Click="English_Click"/>
                </MenuFlyoutSubItem>

                <MenuFlyoutSeparator/>
                <MenuFlyoutItem Text="Reset STM" x:Uid="mainBT_STM" FontSize="20" HorizontalAlignment="Left" Click="FlyoutResetSTM_Click" Width="150"/>
                <MenuFlyoutSeparator/>
                <ToggleMenuFlyoutItem x:Name="Button_Debug" x:Uid="mainBT_Debug" Text="Debug" FontSize="20" HorizontalAlignment="Left" Width="150" IsChecked="True" Click="Debug_Click"/>
                <MenuFlyoutSeparator/>
                <MenuFlyoutItem x:Uid="mainBT_Reboot"   Text="Neustart"   FontSize="20" HorizontalAlignment="Left" Click="FlyoutReboot_Click" Width="150"/>
                <MenuFlyoutItem x:Uid="mainBT_Shutdown" Text="Herunterfahren" FontSize="20" HorizontalAlignment="Left" Click="FlyoutShutdown_Click" Width="150"/>
            </MenuFlyout>
        </Button.Flyout>
    </Button>

Solution

  • I am not sure why do you set Width to 150, but it is obviously not enough to display the text.