fix: ItemsPanel assign more than once

This commit is contained in:
leo 2024-07-10 11:06:32 +08:00
parent 4e13703b9d
commit 0ba58a6e9b
No known key found for this signature in database

View file

@ -797,7 +797,6 @@
CornerRadius="{DynamicResource OverlayCornerRadius}"> CornerRadius="{DynamicResource OverlayCornerRadius}">
<ScrollViewer Theme="{StaticResource FluentMenuScrollViewer}"> <ScrollViewer Theme="{StaticResource FluentMenuScrollViewer}">
<ItemsPresenter Name="PART_ItemsPresenter" <ItemsPresenter Name="PART_ItemsPresenter"
ItemsPanel="{TemplateBinding ItemsPanel}"
Margin="{DynamicResource MenuFlyoutScrollerMargin}" Margin="{DynamicResource MenuFlyoutScrollerMargin}"
Grid.IsSharedSizeScope="True"> Grid.IsSharedSizeScope="True">
<ItemsPresenter.ItemsPanel> <ItemsPresenter.ItemsPanel>
@ -1050,8 +1049,7 @@
<Setter Property="VerticalAlignment" Value="Stretch"/> <Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Path Grid.Column="0" <Path x:Name="PART_IndicatorIcon"
x:Name="PART_IndicatorIcon"
Width="12" Width="12"
Data="{StaticResource Icons.Filter}" Data="{StaticResource Icons.Filter}"
Fill="Transparent" Fill="Transparent"
@ -1103,8 +1101,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border Background="Transparent"> <Border Background="Transparent">
<Path Grid.Column="0" <Path x:Name="PART_IndicatorIcon"
x:Name="PART_IndicatorIcon"
Width="14" Height="14" Width="14" Height="14"
Stretch="Uniform" Stretch="Uniform"
Data="{StaticResource Icons.LayoutVertical}" Data="{StaticResource Icons.LayoutVertical}"
@ -1147,8 +1144,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border Background="Transparent"> <Border Background="Transparent">
<Path Grid.Column="0" <Path x:Name="PART_IndicatorIcon"
x:Name="PART_IndicatorIcon"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Stretch="Fill" Stretch="Fill"
Width="14" Height="10" Width="14" Height="10"