From 31bfb3478f756681183b5f442c876364c760f0c1 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Tue, 9 May 2023 21:41:04 +0800 Subject: [PATCH] Try reverting these --- src/Controls/src/Core/Layout.cs | 5 +++-- src/Controls/src/Core/Layout/Layout.cs | 14 +++----------- src/Controls/src/Core/VisualElement.cs | 7 ++++--- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/Controls/src/Core/Layout.cs b/src/Controls/src/Core/Layout.cs index b07c3f2b3956..e3523f6936e5 100644 --- a/src/Controls/src/Core/Layout.cs +++ b/src/Controls/src/Core/Layout.cs @@ -72,8 +72,9 @@ public abstract class Layout : View, ILayout, ILayoutController, IPaddingElement /// Bindable property for . public static readonly BindableProperty CascadeInputTransparentProperty = - BindableProperty.Create(nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true, - propertyChanged: OnCascadeInputTransparentPropertyChanged); + BindableProperty.Create(nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true); + //BindableProperty.Create(nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true, + // propertyChanged: OnCascadeInputTransparentPropertyChanged); /// Bindable property for . public static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty; diff --git a/src/Controls/src/Core/Layout/Layout.cs b/src/Controls/src/Core/Layout/Layout.cs index 510279013115..5a222a2a5589 100644 --- a/src/Controls/src/Core/Layout/Layout.cs +++ b/src/Controls/src/Core/Layout/Layout.cs @@ -211,9 +211,6 @@ protected virtual void OnAdd(int index, IView view) { NotifyHandler(nameof(ILayoutHandler.Add), index, view); - // Make sure CascadeInputTransparent is applied, if necessary - Handler?.UpdateValue(nameof(CascadeInputTransparent)); - // Take care of the Element internal bookkeeping if (view is Element element) { @@ -241,9 +238,6 @@ protected virtual void OnInsert(int index, IView view) { NotifyHandler(nameof(ILayoutHandler.Insert), index, view); - // Make sure CascadeInputTransparent is applied, if necessary - Handler?.UpdateValue(nameof(CascadeInputTransparent)); - // Take care of the Element internal bookkeeping if (view is Element element) { @@ -254,9 +248,6 @@ protected virtual void OnInsert(int index, IView view) protected virtual void OnUpdate(int index, IView view, IView oldView) { NotifyHandler(nameof(ILayoutHandler.Update), index, view); - - // Make sure CascadeInputTransparent is applied, if necessary - Handler?.UpdateValue(nameof(CascadeInputTransparent)); } void NotifyHandler(string action, int index, IView view) @@ -293,8 +284,9 @@ public Graphics.Size CrossPlatformArrange(Graphics.Rect bounds) /// Bindable property for . public static readonly BindableProperty CascadeInputTransparentProperty = - BindableProperty.Create(nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true, - propertyChanged: OnCascadeInputTransparentPropertyChanged); + BindableProperty.Create(nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true); + //BindableProperty.Create(nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true, + // propertyChanged: OnCascadeInputTransparentPropertyChanged); public bool CascadeInputTransparent { diff --git a/src/Controls/src/Core/VisualElement.cs b/src/Controls/src/Core/VisualElement.cs index e347ed4ca017..dfc86014b354 100644 --- a/src/Controls/src/Core/VisualElement.cs +++ b/src/Controls/src/Core/VisualElement.cs @@ -23,9 +23,10 @@ public partial class VisualElement : NavigableElement, IAnimatable, IVisualEleme bool _inputTransparentExplicit = (bool)InputTransparentProperty.DefaultValue; /// Bindable property for . - public static readonly BindableProperty InputTransparentProperty = BindableProperty.Create( - "InputTransparent", typeof(bool), typeof(VisualElement), default(bool), - propertyChanged: OnInputTransparentPropertyChanged, coerceValue: CoerceInputTransparentProperty); + public static readonly BindableProperty InputTransparentProperty = BindableProperty.Create("InputTransparent", typeof(bool), typeof(VisualElement), default(bool)); + //public static readonly BindableProperty InputTransparentProperty = BindableProperty.Create( + // "InputTransparent", typeof(bool), typeof(VisualElement), default(bool), + // propertyChanged: OnInputTransparentPropertyChanged, coerceValue: CoerceInputTransparentProperty); bool _isEnabledExplicit = (bool)IsEnabledProperty.DefaultValue;