From 9e4552e64f4f5200fc203bc915a26f86a300d2f2 Mon Sep 17 00:00:00 2001 From: punker76 Date: Sat, 2 Nov 2019 20:49:03 +0100 Subject: [PATCH] (GH-3661) Add a new OverlayBrush dependency property to SplitView - Add new OverlayBrush dependency property that enables using an custom Overlay --- .../Controls/SplitView/SplitView.cs | 17 +++++++++++++++++ src/MahApps.Metro/Themes/SplitView.xaml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/MahApps.Metro/Controls/SplitView/SplitView.cs b/src/MahApps.Metro/Controls/SplitView/SplitView.cs index db040ec13d..7461e94935 100644 --- a/src/MahApps.Metro/Controls/SplitView/SplitView.cs +++ b/src/MahApps.Metro/Controls/SplitView/SplitView.cs @@ -130,6 +130,23 @@ public bool IsPaneOpen set { this.SetValue(IsPaneOpenProperty, value); } } + /// + /// Identifies the dependency property. + /// + /// The identifier for the dependency property. + public static readonly DependencyProperty OverlayBrushProperty = + DependencyProperty.Register("OverlayBrush", typeof(Brush), typeof(SplitView), new PropertyMetadata(Brushes.Transparent)); + + /// + /// Gets or sets a value that specifies the OverlayBrush + /// + /// The current OverlayBrush + public Brush OverlayBrush + { + get { return (Brush)this.GetValue(OverlayBrushProperty); } + set { this.SetValue(OverlayBrushProperty, value); } + } + /// /// Identifies the dependency property. /// diff --git a/src/MahApps.Metro/Themes/SplitView.xaml b/src/MahApps.Metro/Themes/SplitView.xaml index 17cedbeb12..91f795b0fb 100644 --- a/src/MahApps.Metro/Themes/SplitView.xaml +++ b/src/MahApps.Metro/Themes/SplitView.xaml @@ -436,7 +436,7 @@ Focusable="False" IsTabStop="False" />