From 9044d586a5350966108f7f333bafc14829be5633 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 8 Mar 2016 00:53:16 +0100 Subject: [PATCH] Make Decorator.Child an IControl. --- src/Perspex.Controls/Decorator.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Perspex.Controls/Decorator.cs b/src/Perspex.Controls/Decorator.cs index fcf7847d6e..eea1108f67 100644 --- a/src/Perspex.Controls/Decorator.cs +++ b/src/Perspex.Controls/Decorator.cs @@ -13,8 +13,8 @@ namespace Perspex.Controls /// /// Defines the property. /// - public static readonly StyledProperty ChildProperty = - PerspexProperty.Register(nameof(Child)); + public static readonly StyledProperty ChildProperty = + PerspexProperty.Register(nameof(Child)); /// /// Defines the property. @@ -35,7 +35,7 @@ namespace Perspex.Controls /// Gets or sets the decorated control. /// [Content] - public Control Child + public IControl Child { get { return GetValue(ChildProperty); } set { SetValue(ChildProperty, value); } @@ -70,8 +70,7 @@ namespace Perspex.Controls /// protected override Size ArrangeOverride(Size finalSize) { - Control content = Child; - content?.Arrange(new Rect(finalSize).Deflate(Padding)); + Child?.Arrange(new Rect(finalSize).Deflate(Padding)); return finalSize; }