Skip to content

Commit

Permalink
(MahAppsGH-3661) Add a new OverlayBrush dependency property to SplitView
Browse files Browse the repository at this point in the history
- Add new OverlayBrush dependency property that enables using an custom Overlay
  • Loading branch information
punker76 authored and amkuchta committed Nov 19, 2019
1 parent 50dcbf2 commit 9e4552e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/MahApps.Metro/Controls/SplitView/SplitView.cs
Expand Up @@ -130,6 +130,23 @@ public bool IsPaneOpen
set { this.SetValue(IsPaneOpenProperty, value); }
}

/// <summary>
/// Identifies the <see cref="OverlayBrush"/> dependency property.
/// </summary>
/// <returns>The identifier for the <see cref="OverlayBrush" /> dependency property.</returns>
public static readonly DependencyProperty OverlayBrushProperty =
DependencyProperty.Register("OverlayBrush", typeof(Brush), typeof(SplitView), new PropertyMetadata(Brushes.Transparent));

/// <summary>
/// Gets or sets a value that specifies the OverlayBrush
/// </summary>
/// <returns>The current OverlayBrush</returns>
public Brush OverlayBrush
{
get { return (Brush)this.GetValue(OverlayBrushProperty); }
set { this.SetValue(OverlayBrushProperty, value); }
}

/// <summary>
/// Identifies the <see cref="OpenPaneLength" /> dependency property.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Themes/SplitView.xaml
Expand Up @@ -436,7 +436,7 @@
Focusable="False"
IsTabStop="False" />
<Rectangle x:Name="LightDismissLayer"
Fill="Transparent"
Fill="{TemplateBinding OverlayBrush}"
Visibility="Collapsed" />
</Grid>

Expand Down

0 comments on commit 9e4552e

Please sign in to comment.