From 7e16a9032a75e03cc32ae16f1fa8944d87132c6a Mon Sep 17 00:00:00 2001 From: Jumar Macato Date: Thu, 30 May 2019 21:39:04 +0800 Subject: [PATCH] Add inheritance parent to DefBase. --- src/Avalonia.Controls/DefinitionBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Controls/DefinitionBase.cs b/src/Avalonia.Controls/DefinitionBase.cs index a0b68a25a6..3d1a5f0e79 100644 --- a/src/Avalonia.Controls/DefinitionBase.cs +++ b/src/Avalonia.Controls/DefinitionBase.cs @@ -68,6 +68,7 @@ namespace Avalonia.Controls /// internal void OnEnterParentTree() { + this.InheritanceParent = Parent; if (_sharedState == null) { // start with getting SharedSizeGroup value. @@ -87,7 +88,7 @@ namespace Avalonia.Controls protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e) { - if(e.Property.PropertyType == typeof(GridLength) + if (e.Property.PropertyType == typeof(GridLength) || e.Property.PropertyType == typeof(double)) OnUserSizePropertyChanged(e); @@ -165,7 +166,6 @@ namespace Avalonia.Controls } } } - /// /// /// @@ -939,7 +939,7 @@ namespace Avalonia.Controls static DefinitionBase() { SharedSizeGroupProperty.Changed.AddClassHandler(OnSharedSizeGroupPropertyChanged); - PrivateSharedSizeScopeProperty.Changed.AddClassHandler(OnPrivateSharedSizeScopePropertyChanged); + PrivateSharedSizeScopeProperty.Changed.AddClassHandler(OnPrivateSharedSizeScopePropertyChanged); } #endregion Properties