From cb8cbca954fb28fba3806c8ecce972040aaab5e8 Mon Sep 17 00:00:00 2001
From: Corvin <43533385+corvinsz@users.noreply.github.com>
Date: Mon, 1 Jun 2026 17:09:00 +0200
Subject: [PATCH] feat: allow for additional content in NavigationRail-bar
---
src/MainDemo.Wpf/NavigationRail.xaml | 56 +++++++++++++++++++
.../NavigationRailAssist.cs | 9 ++-
.../MaterialDesignTheme.TabControl.xaml | 20 ++++++-
3 files changed, 81 insertions(+), 4 deletions(-)
diff --git a/src/MainDemo.Wpf/NavigationRail.xaml b/src/MainDemo.Wpf/NavigationRail.xaml
index d7f7733e5e..c7d393f926 100644
--- a/src/MainDemo.Wpf/NavigationRail.xaml
+++ b/src/MainDemo.Wpf/NavigationRail.xaml
@@ -792,5 +792,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/MaterialDesignThemes.Wpf/NavigationRailAssist.cs b/src/MaterialDesignThemes.Wpf/NavigationRailAssist.cs
index 04456690b3..7da92e140f 100644
--- a/src/MaterialDesignThemes.Wpf/NavigationRailAssist.cs
+++ b/src/MaterialDesignThemes.Wpf/NavigationRailAssist.cs
@@ -2,7 +2,7 @@ namespace MaterialDesignThemes.Wpf;
public static class NavigationRailAssist
{
- private static readonly CornerRadius DefaultCornerRadius = new CornerRadius(2.0);
+ private static readonly CornerRadius DefaultCornerRadius = new(2.0);
#region CornerRadius
///
@@ -29,6 +29,13 @@ public static CornerRadius GetCornerRadius(DependencyObject element)
#endregion
+ #region Property AdditionalEndContent
+ public static readonly DependencyProperty AdditionalEndContentProperty = DependencyProperty.RegisterAttached(
+ "AdditionalEndContent", typeof(object), typeof(NavigationRailAssist), new PropertyMetadata(null));
+ public static object GetAdditionalEndContent(DependencyObject obj) => (object)obj.GetValue(AdditionalEndContentProperty);
+ public static void SetAdditionalEndContent(DependencyObject obj, object value) => obj.SetValue(AdditionalEndContentProperty, value);
+ #endregion
+
#region Property ShowSelectionBackground
public static readonly DependencyProperty ShowSelectionBackgroundProperty = DependencyProperty.RegisterAttached(
diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml
index 6619e62af9..fef26c208d 100644
--- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml
+++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml
@@ -820,10 +820,12 @@
+
+
+
+
-
+
@@ -892,10 +902,12 @@
+
+
-
+
@@ -906,6 +918,8 @@
+
+