LoginSignup
0
0

keyを使わずにMenuItemに共通スタイルを設定する

Last updated at Posted at 2024-01-26

MenuItemに共通のスタイルを設定したい。
keyを使えば簡単に設定できるけど、keyを使わずに設定したい。

成功例

xaml
<Style TargetType="Menu">
    <Style.Resources>
        <Style TargetType="MenuItem">
            <Setter Property="FontSize" Value="16"/>
        </Style>
    </Style.Resources>
</Style>

失敗例

xaml
<Style TargetType="MenuItem">
    <Setter Property="FontSize" Value="16"/>
/Style>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0