diff --git a/samples/ControlCatalog/Pages/DrawerPage/DrawerPageCustomizationPage.xaml b/samples/ControlCatalog/Pages/DrawerPage/DrawerPageCustomizationPage.xaml
index cba7837314..4987e8979e 100644
--- a/samples/ControlCatalog/Pages/DrawerPage/DrawerPageCustomizationPage.xaml
+++ b/samples/ControlCatalog/Pages/DrawerPage/DrawerPageCustomizationPage.xaml
@@ -118,6 +118,11 @@
Header="Customization"
DrawerLength="260"
DrawerHeaderBackground="{DynamicResource SystemControlHighlightAccentBrush}">
+
+
+
+
+
diff --git a/samples/ControlCatalog/Pages/DrawerPage/EcoTrackerAppPage.xaml b/samples/ControlCatalog/Pages/DrawerPage/EcoTrackerAppPage.xaml
index 22320fbc8d..1e9106ccfe 100644
--- a/samples/ControlCatalog/Pages/DrawerPage/EcoTrackerAppPage.xaml
+++ b/samples/ControlCatalog/Pages/DrawerPage/EcoTrackerAppPage.xaml
@@ -52,9 +52,13 @@
-
+ M12 3C9 6 6 9 6 13C6 17.4 8.7 21 12 22C15.3 21 18 17.4 18 13C18 9 15 6 12 3Z
+
+
+
+
+
diff --git a/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomTabBarPage.xaml.cs b/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomTabBarPage.xaml.cs
index bb7302c1cd..b1a692b85a 100644
--- a/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomTabBarPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomTabBarPage.xaml.cs
@@ -5,7 +5,6 @@ namespace ControlCatalog.Pages
{
public partial class TabbedPageCustomTabBarPage : UserControl
{
- // Fluent UI icon geometries (24x24 viewbox)
private static readonly StreamGeometry HomeGeometry =
StreamGeometry.Parse("M12.9942 2.79444C12.4118 2.30208 11.5882 2.30208 11.0058 2.79444L3.50582 9.39444C3.18607 9.66478 3 10.0634 3 10.4828V20.25C3 20.9404 3.55964 21.5 4.25 21.5H8.25C8.94036 21.5 9.5 20.9404 9.5 20.25V14.75C9.5 14.6119 9.61193 14.5 9.75 14.5H14.25C14.3881 14.5 14.5 14.6119 14.5 14.75V20.25C14.5 20.9404 15.0596 21.5 15.75 21.5H19.75C20.4404 21.5 21 20.9404 21 20.25V10.4828C21 10.0634 20.8139 9.66478 20.4942 9.39444L12.9942 2.79444Z");
private static readonly StreamGeometry WalletGeometry =
@@ -25,16 +24,11 @@ namespace ControlCatalog.Pages
private void SetupIcons()
{
- SetIcon(HomePage, HomeGeometry);
- SetIcon(WalletPage, WalletGeometry);
- SetIcon(SendPage, SendGeometry);
- SetIcon(ActivityPage, ActivityGeometry);
- SetIcon(ProfilePage, ProfileGeometry);
- }
-
- private static void SetIcon(ContentPage page, StreamGeometry geometry)
- {
- page.Icon = geometry;
+ HomePage.Icon = new PathIcon { Data = HomeGeometry };
+ WalletPage.Icon = new PathIcon { Data = WalletGeometry };
+ SendPage.Icon = new PathIcon { Data = SendGeometry };
+ ActivityPage.Icon = new PathIcon { Data = ActivityGeometry };
+ ProfilePage.Icon = new PathIcon { Data = ProfileGeometry };
}
}
}
diff --git a/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomizationPage.xaml.cs b/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomizationPage.xaml.cs
index dc72759c5e..b4eb6d9b49 100644
--- a/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomizationPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomizationPage.xaml.cs
@@ -109,14 +109,9 @@ namespace ControlCatalog.Pages
private void OnShowIconsChanged(object? sender, RoutedEventArgs e)
{
bool show = ShowIconsCheck.IsChecked == true;
- SetIcon(HomePage, show ? HomeGeometry : null);
- SetIcon(SearchPage, show ? SearchGeometry : null);
- SetIcon(SettingsPage, show ? SettingsGeometry : null);
- }
-
- private static void SetIcon(ContentPage page, StreamGeometry? geometry)
- {
- page.Icon = geometry;
+ HomePage.Icon = show ? new PathIcon { Data = HomeGeometry } : null;
+ SearchPage.Icon = show ? new PathIcon { Data = SearchGeometry } : null;
+ SettingsPage.Icon = show ? new PathIcon { Data = SettingsGeometry } : null;
}
private void OnTabEnabledChanged(object? sender, RoutedEventArgs e)
diff --git a/samples/ControlCatalog/Pages/TabbedPage/TabbedPageFabPage.xaml.cs b/samples/ControlCatalog/Pages/TabbedPage/TabbedPageFabPage.xaml.cs
index 5c10a50df7..b52bfd4d8a 100644
--- a/samples/ControlCatalog/Pages/TabbedPage/TabbedPageFabPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/TabbedPage/TabbedPageFabPage.xaml.cs
@@ -28,10 +28,10 @@ namespace ControlCatalog.Pages
private void SetupIcons()
{
- FeedPage.Icon = FeedGeometry;
- DiscoverPage.Icon = DiscoverGeometry;
- AlertsPage.Icon = AlertsGeometry;
- ProfilePage.Icon = ProfileGeometry;
+ FeedPage.Icon = new PathIcon { Data = FeedGeometry };
+ DiscoverPage.Icon = new PathIcon { Data = DiscoverGeometry };
+ AlertsPage.Icon = new PathIcon { Data = AlertsGeometry };
+ ProfilePage.Icon = new PathIcon { Data = ProfileGeometry };
}
private void OnFabClicked(object? sender, RoutedEventArgs e)
diff --git a/src/Avalonia.Controls/Page/DrawerPage.cs b/src/Avalonia.Controls/Page/DrawerPage.cs
index 69b1a41842..954ec9c918 100644
--- a/src/Avalonia.Controls/Page/DrawerPage.cs
+++ b/src/Avalonia.Controls/Page/DrawerPage.cs
@@ -29,9 +29,6 @@ namespace Avalonia.Controls
[TemplatePart("PART_PaneButton", typeof(ToggleButton))]
[TemplatePart("PART_CompactPaneToggle", typeof(ToggleButton))]
[TemplatePart("PART_Backdrop", typeof(Border))]
- [TemplatePart("PART_CompactPaneIconPresenter", typeof(ContentPresenter))]
- [TemplatePart("PART_PaneIconPresenter", typeof(ContentPresenter))]
- [TemplatePart("PART_BottomPaneIconPresenter", typeof(ContentPresenter))]
[PseudoClasses(":placement-right", ":placement-top", ":placement-bottom", ":detail-is-navpage")]
public class DrawerPage : Page
{
@@ -133,6 +130,12 @@ namespace Avalonia.Controls
public static readonly StyledProperty