bdlukaa / fluent_ui

Implements Microsoft's WinUI3 in Flutter.
https://bdlukaa.github.io/fluent_ui/
BSD 3-Clause "New" or "Revised" License
2.97k stars 464 forks source link

Implement `RadioMenuFlyoutItem` and `ToggleMenuFlyoutItem` #1108

Closed bdlukaa closed 1 month ago

bdlukaa commented 2 months ago

RadioMenuFlyoutItem RadioMenuFlyoutItem lets only one element of its group to be checked.

    <muxc:MenuBarItem Title="View">
        <MenuFlyoutItem Text="Output"/>
        <MenuFlyoutSeparator/>
        <muxc:RadioMenuFlyoutItem Text="Landscape" GroupName="OrientationGroup"/>
        <muxc:RadioMenuFlyoutItem Text="Portrait" GroupName="OrientationGroup" IsChecked="True"/>
        <MenuFlyoutSeparator/>
        <muxc:RadioMenuFlyoutItem Text="Small icons" GroupName="SizeGroup"/>
        <muxc:RadioMenuFlyoutItem Text="Medium icons" IsChecked="True" GroupName="SizeGroup"/>
        <muxc:RadioMenuFlyoutItem Text="Large icons" GroupName="SizeGroup"/>
    </muxc:MenuBarItem>

image

ToggleMenuFlyoutItem ToggleMenuFlyoutItem lets several elements of its group to be checked.

<Button Content="Options">
    <Button.Flyout>
        <MenuFlyout>
            <MenuFlyoutItem Text="Reset"/>
            <MenuFlyoutSeparator/>
            <ToggleMenuFlyoutItem Text="Repeat" IsChecked="False"/>
            <ToggleMenuFlyoutItem Text="Shuffle" IsChecked="True"/>
        </MenuFlyout>
    </Button.Flyout>
</Button>

image