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