Share via


RadioMenuFlyoutItem.GroupName Property

Definition

Gets or sets the name that specifies which RadioMenuFlyoutItem controls are mutually exclusive.

public:
 property Platform::String ^ GroupName { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring GroupName();

void GroupName(winrt::hstring value);
public string GroupName { get; set; }
var string = radioMenuFlyoutItem.groupName;
radioMenuFlyoutItem.groupName = string;
Public Property GroupName As String

Property Value

String

Platform::String

winrt::hstring

Examples

Radio menu flyout items work in groups, and users can only select one item in a radio menu flyout item group. To create multiple groups of radio buttons within a single menu, be sure to specify the GroupName property of each set.

Two groups of radio menu flyout items within a View menu bar item

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

Remarks

This property is optional. All RadioMenuFlyoutItems with the default (empty) GroupName will be in the same group.

Applies to