diff --git a/src/MainDemo.Wpf/Tabs.xaml b/src/MainDemo.Wpf/Tabs.xaml index c09a30d49b..6b8c7ba06d 100644 --- a/src/MainDemo.Wpf/Tabs.xaml +++ b/src/MainDemo.Wpf/Tabs.xaml @@ -4,6 +4,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:domain="clr-namespace:MaterialDesignDemo.Domain" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:sharedTabControls="clr-namespace:MaterialDesignDemo.Shared.Examples.TabControls;assembly=MaterialDesignDemo.Shared" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:smtx="clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML" d:DataContext="{d:DesignInstance Type=domain:TabsViewModel, @@ -1098,6 +1099,9 @@ - + + + + diff --git a/src/MaterialDesignDemo.Shared/Examples/TabControls/NavigationButtonStyleExample.xaml b/src/MaterialDesignDemo.Shared/Examples/TabControls/NavigationButtonStyleExample.xaml new file mode 100644 index 0000000000..f6905e3bd6 --- /dev/null +++ b/src/MaterialDesignDemo.Shared/Examples/TabControls/NavigationButtonStyleExample.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MaterialDesignDemo.Shared/Examples/TabControls/NavigationButtonStyleExample.xaml.cs b/src/MaterialDesignDemo.Shared/Examples/TabControls/NavigationButtonStyleExample.xaml.cs new file mode 100644 index 0000000000..ba9eee5d01 --- /dev/null +++ b/src/MaterialDesignDemo.Shared/Examples/TabControls/NavigationButtonStyleExample.xaml.cs @@ -0,0 +1,12 @@ +namespace MaterialDesignDemo.Shared.Examples.TabControls; + +/// +/// Interaction logic for NavigationButtonStyleExample.xaml +/// +public partial class NavigationButtonStyleExample : UserControl +{ + public NavigationButtonStyleExample() + { + InitializeComponent(); + } +} diff --git a/src/MaterialDesignThemes.Wpf/TabAssist.cs b/src/MaterialDesignThemes.Wpf/TabAssist.cs index 8769559892..f05829d936 100644 --- a/src/MaterialDesignThemes.Wpf/TabAssist.cs +++ b/src/MaterialDesignThemes.Wpf/TabAssist.cs @@ -154,6 +154,13 @@ public static void SetScrollDuration(DependencyObject obj, TimeSpan value) public static readonly DependencyProperty ScrollDurationProperty = DependencyProperty.RegisterAttached("ScrollDuration", typeof(TimeSpan), typeof(TabAssist), new PropertyMetadata(TimeSpan.Zero)); + + public static Style? GetNavigationButtonStyle(TabControl tabControl) + => (Style?)tabControl.GetValue(NavigationButtonStyleProperty); + public static void SetNavigationButtonStyle(TabControl tabControl, Style? value) + => tabControl.SetValue(NavigationButtonStyleProperty, value); + public static readonly DependencyProperty NavigationButtonStyleProperty = + DependencyProperty.RegisterAttached("NavigationButtonStyle", typeof(Style), typeof(TabAssist), new PropertyMetadata(null)); } public enum NavigationPanelPlacement diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml index 1568a277ee..31e9217a9f 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml @@ -9,6 +9,7 @@ +