fix: add ContentTemplate binding for DrawerIcon in DrawerPage.axaml.

This commit is contained in:
Zhang Dian
2026-03-20 15:47:53 +08:00
parent fbfe5b0b6a
commit 64e2b50a1d

View File

@@ -50,7 +50,8 @@
Name="PART_PaneIconPresenter"
Grid.Column="1"
VerticalAlignment="Center"
Content="{TemplateBinding DrawerIcon}" />
Content="{TemplateBinding DrawerIcon}"
ContentTemplate="{TemplateBinding DrawerIconTemplate}" />
</Grid>
</Border>
@@ -84,13 +85,16 @@
Name="PART_CompactPaneIconPresenter"
DockPanel.Dock="Top"
IsVisible="False"
Content="{TemplateBinding DrawerIcon}" />
Content="{TemplateBinding DrawerIcon}"
ContentTemplate="{TemplateBinding DrawerIconTemplate}" />
<!-- Bottom pane icon -->
<ContentPresenter
Name="PART_BottomPaneIconPresenter"
DockPanel.Dock="Bottom"
IsVisible="False" />
IsVisible="False"
Content="{TemplateBinding DrawerIcon}"
ContentTemplate="{TemplateBinding DrawerIconTemplate}" />
<!-- Drawer main content -->
<ContentPresenter