diff --git a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
index 98ee17ee1f..8e892ffc21 100644
--- a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
+++ b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Rendering;
@@ -106,5 +107,10 @@ namespace Avalonia.Platform
IMouseDevice MouseDevice { get; }
IPopupImpl CreatePopup();
+
+ ///
+ /// Gets or sets the ofthe TopLevel.
+ ///
+ WindowTransparencyLevel TransparencyLevel { get; set; }
}
}
diff --git a/src/Avalonia.Controls/TopLevel.cs b/src/Avalonia.Controls/TopLevel.cs
index d17f3b0423..8861c72418 100644
--- a/src/Avalonia.Controls/TopLevel.cs
+++ b/src/Avalonia.Controls/TopLevel.cs
@@ -43,6 +43,12 @@ namespace Avalonia.Controls
public static readonly StyledProperty PointerOverElementProperty =
AvaloniaProperty.Register(nameof(IInputRoot.PointerOverElement));
+ ///
+ /// Represents the current .
+ ///
+ public static readonly StyledProperty TransparencyLevelProperty =
+ AvaloniaProperty.Register(nameof(TransparencyLevel), WindowTransparencyLevel.None);
+
private readonly IInputManager _inputManager;
private readonly IAccessKeyHandler _accessKeyHandler;
private readonly IKeyboardNavigationHandler _keyboardNavigationHandler;
@@ -57,6 +63,9 @@ namespace Avalonia.Controls
static TopLevel()
{
AffectsMeasure(ClientSizeProperty);
+
+ TransparencyLevelProperty.Changed.AddClassHandler(
+ (tl, e) => { if (tl.PlatformImpl != null) tl.PlatformImpl.TransparencyLevel = (WindowTransparencyLevel)e.NewValue; });
}
///
@@ -155,6 +164,15 @@ namespace Avalonia.Controls
protected set { SetAndRaise(ClientSizeProperty, ref _clientSize, value); }
}
+ ///
+ /// Gets or sets the .
+ ///
+ public WindowTransparencyLevel TransparencyLevel
+ {
+ get { return GetValue(TransparencyLevelProperty); }
+ set { SetValue(TransparencyLevelProperty, value); }
+ }
+
public ILayoutManager LayoutManager
{
get