From 81a64bdfe2e34ebccf8e91846aa90f0d439319a4 Mon Sep 17 00:00:00 2001 From: Konstantin S <3002068+HavenDV@users.noreply.github.com> Date: Mon, 11 Apr 2022 22:59:13 +1000 Subject: [PATCH] fix: Reverted RowDefinition and ColumnDefinition changes. --- .../UI/Xaml/Controls/Grid/ColumnDefinition.cs | 17 ----------------- .../UI/Xaml/Controls/Grid/RowDefinition.cs | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/src/Uno.UI/UI/Xaml/Controls/Grid/ColumnDefinition.cs b/src/Uno.UI/UI/Xaml/Controls/Grid/ColumnDefinition.cs index ff16324affce..3a735299143e 100644 --- a/src/Uno.UI/UI/Xaml/Controls/Grid/ColumnDefinition.cs +++ b/src/Uno.UI/UI/Xaml/Controls/Grid/ColumnDefinition.cs @@ -5,12 +5,10 @@ using System.Text; using Uno.UI.DataBinding; using Uno.UI.Xaml; -using Windows.UI.Xaml.Markup; namespace Windows.UI.Xaml.Controls { [DebuggerDisplay("{DebugDisplay,nq}")] - [ContentProperty(Name = "Content")] public partial class ColumnDefinition : DefinitionBase, DependencyObject { public ColumnDefinition() @@ -25,21 +23,6 @@ internal void OnPropertyChanged2(DependencyPropertyChangedEventArgs args) InvalidateDefinition(); } - // New WinUI assigned ContentProperty syntax - public virtual object Content - { - set - { - if (value is not string stringValue || - string.IsNullOrWhiteSpace(stringValue)) - { - return; - } - - Width = GridLength.ParseGridLength(stringValue.Trim()).FirstOrDefault(); - } - } - #region Width DependencyProperty private static GridLength GetWidthDefaultValue() => GridLengthHelper.OneStar; diff --git a/src/Uno.UI/UI/Xaml/Controls/Grid/RowDefinition.cs b/src/Uno.UI/UI/Xaml/Controls/Grid/RowDefinition.cs index da2693be177b..38ead5e75046 100644 --- a/src/Uno.UI/UI/Xaml/Controls/Grid/RowDefinition.cs +++ b/src/Uno.UI/UI/Xaml/Controls/Grid/RowDefinition.cs @@ -4,12 +4,10 @@ using System.Linq; using System.Text; using Uno.UI.Xaml; -using Windows.UI.Xaml.Markup; namespace Windows.UI.Xaml.Controls { [DebuggerDisplay("{DebugDisplay,nq}")] - [ContentProperty(Name = "Content")] public partial class RowDefinition : DefinitionBase, DependencyObject { public RowDefinition() @@ -24,21 +22,6 @@ internal void OnPropertyChanged2(DependencyPropertyChangedEventArgs args) InvalidateDefinition(); } - // New WinUI assigned ContentProperty syntax - public virtual object Content - { - set - { - if (value is not string stringValue || - string.IsNullOrWhiteSpace(stringValue)) - { - return; - } - - Height = GridLength.ParseGridLength(stringValue.Trim()).FirstOrDefault(); - } - } - #region Height DependencyProperty private static GridLength GetHeightDefaultValue() => GridLengthHelper.OneStar;