Skip to content

Commit 51bb6f4

Browse files
authored
Addds ItemsPresenter in Menu (#10788)
1 parent 93535b0 commit 51bb6f4

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Menu.xaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
BorderBrush="{TemplateBinding BorderBrush}"
2424
BorderThickness="{TemplateBinding BorderThickness}"
2525
Padding="{TemplateBinding Padding}">
26-
<StackPanel
27-
ClipToBounds="True"
28-
IsItemsHost="True"
29-
Orientation="Horizontal" />
26+
<ItemsPresenter
27+
ClipToBounds="True" />
3028
</Border>
3129
</ControlTemplate>
3230
</Setter.Value>

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,7 @@
33253325
<Setter.Value>
33263326
<ControlTemplate TargetType="{x:Type Menu}">
33273327
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
3328-
<StackPanel ClipToBounds="True" IsItemsHost="True" Orientation="Horizontal" />
3328+
<ItemsPresenter ClipToBounds="True" />
33293329
</Border>
33303330
</ControlTemplate>
33313331
</Setter.Value>

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.HC.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3238,7 +3238,7 @@
32383238
<Setter.Value>
32393239
<ControlTemplate TargetType="{x:Type Menu}">
32403240
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
3241-
<StackPanel ClipToBounds="True" IsItemsHost="True" Orientation="Horizontal" />
3241+
<ItemsPresenter ClipToBounds="True" />
32423242
</Border>
32433243
</ControlTemplate>
32443244
</Setter.Value>

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Light.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3334,7 +3334,7 @@
33343334
<Setter.Value>
33353335
<ControlTemplate TargetType="{x:Type Menu}">
33363336
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
3337-
<StackPanel ClipToBounds="True" IsItemsHost="True" Orientation="Horizontal" />
3337+
<ItemsPresenter ClipToBounds="True" />
33383338
</Border>
33393339
</ControlTemplate>
33403340
</Setter.Value>

0 commit comments

Comments
 (0)