diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/Custom/CommonBrushLayer.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/Custom/CommonBrushLayer.cs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/CommonBrushLayer.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/CommonBrushLayer.cs index e49e560..6f04bb7 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/CommonBrushLayer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/CommonBrushLayer.cs @@ -1,4 +1,4 @@ -using System; +using System; using AppKit; using CoreAnimation; using CoreGraphics; @@ -17,11 +17,9 @@ namespace Xamarin.PropertyEditing.Mac } CALayer brushLayer; - CALayer BrushLayer - { + CALayer BrushLayer { get => brushLayer; - set - { + set { if (brushLayer != null) brushLayer.RemoveFromSuperLayer (); @@ -33,11 +31,9 @@ namespace Xamarin.PropertyEditing.Mac } CommonBrush brush; - public CommonBrush Brush - { + public CommonBrush Brush { get => brush; - set - { + set { brush = value; BrushLayer = CreateBrushLayer (brush); Opacity = brush == null ? 0 : 1; |