Share via


RadioMenuFlyoutItem.AreCheckStatesEnabledProperty プロパティ

定義

AreCheckStatesEnabled 依存関係プロパティを識別します。 MenuFlyoutSubItem に RadioMenuFlyoutItems が子として含まれているかどうかを表します。

public:
 static property DependencyProperty ^ AreCheckStatesEnabledProperty { DependencyProperty ^ get(); };
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnAreCheckStatesEnabledPropertyChanged")]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnAreCheckStatesEnabledPropertyChanged")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
static DependencyProperty AreCheckStatesEnabledProperty();
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnAreCheckStatesEnabledPropertyChanged")]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
public static DependencyProperty AreCheckStatesEnabledProperty { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnAreCheckStatesEnabledPropertyChanged")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")] get; }
var dependencyProperty = RadioMenuFlyoutItem.areCheckStatesEnabledProperty;
Public Shared ReadOnly Property AreCheckStatesEnabledProperty As DependencyProperty

プロパティ値

AreCheckStatesEnabled 依存関係プロパティの識別子。

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodNameAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

次の例では、CommandBar に MenuFlyout の並べ替えオプションを一覧表示する [並べ替え] ボタンがあります。 この MenuFlyout には、RadioMenuFlyoutItems を含む "その他" サブメニューがあります。 これらの項目の 1 つを選択すると、[その他] サブメニューにも選択ビジュアルが表示されます。

<CommandBar DefaultLabelPosition="Right" Grid.Row="1" Margin="50">
    <AppBarToggleButton Icon="Shuffle" Label="Shuffle" />
    <AppBarToggleButton Icon="RepeatAll" Label="Repeat" />
    <AppBarSeparator/>
    <AppBarButton Icon="Back" />
    <AppBarButton Icon="Stop" />
    <AppBarButton Icon="Go" Label="Sort by">
        <AppBarButton.Flyout>
            <MenuFlyout>
                <RadioMenuFlyoutItem Text="Name" GroupName="SortGroup"/>
                <RadioMenuFlyoutItem Text="Date" GroupName="SortGroup"/>
                <RadioMenuFlyoutItem Text="Size" GroupName="SortGroup"/>
                <MenuFlyoutSubItem Text="Other" Style="{StaticResource RadioMenuFlyoutSubItemStyle}">
                    <RadioMenuFlyoutItem GroupName="SortGroup" Text="Album Name"/>
                    <RadioMenuFlyoutItem GroupName="SortGroup" Text="Artist Name"/>
                    <RadioMenuFlyoutItem GroupName="SortGroup" Text="Genre"/>
                </MenuFlyoutSubItem>
            </MenuFlyout>
        </AppBarButton.Flyout>
    </AppBarButton>

    <AppBarSeparator/>
    <AppBarButton Icon="Play" Label="Play" />
    <AppBarButton Icon="Forward" Label="Forward" />

    <CommandBar.SecondaryCommands>
        <AppBarButton Label="Like" />
        <AppBarButton Label="Dislike" />
    </CommandBar.SecondaryCommands>

</CommandBar>

RadioMenuFlyoutItems を含むメニュー

注釈

このプロパティは、 が適用されている RadioMenuFlyoutSubItemStyle MenuFlyoutSubItem と組み合わせてのみ使用する必要があります。 ではこのプロパティが RadioMenuFlyoutSubItemStyle 自動的に true に設定されるため、このプロパティを手動で設定する必要はありません。

RadioMenuFlyoutItem オブジェクトを MenuFlyoutSubItem の子として使用する場合は、MenuFlyoutSubItem スタイルを に設定するRadioMenuFlyoutSubItemStyle必要があります。 これにより true に設定AreCheckStatesEnabledされ、子 RadioMenuFlyoutItems のいずれかが選択されると、MenuFlyoutSubItem にもビジュアル チェック インジケーターが表示されます。

RadioMenuFlyoutItem 子が選択され、MenuFlyout が開いている場合、親と子の両方に選択インジケーターが表示されます。

適用対象

こちらもご覧ください