diff --git a/src/Uno.UI/UI/Xaml/FrameworkElement.net.cs b/src/Uno.UI/UI/Xaml/FrameworkElement.net.cs index 3badae336f0c..fdcf0bc2b800 100644 --- a/src/Uno.UI/UI/Xaml/FrameworkElement.net.cs +++ b/src/Uno.UI/UI/Xaml/FrameworkElement.net.cs @@ -15,6 +15,8 @@ public partial class FrameworkElement : IEnumerable internal List _children = new List(); + internal UIElement VisualParent => ((IDependencyObjectStoreProvider)this).Store.Parent as UIElement; + private protected virtual void OnPostLoading() { } partial void OnLoadingPartial(); diff --git a/src/Uno.UI/UI/Xaml/FrameworkElement.netstdref.cs b/src/Uno.UI/UI/Xaml/FrameworkElement.netstdref.cs index 505f6a017dda..43d73cf5539a 100644 --- a/src/Uno.UI/UI/Xaml/FrameworkElement.netstdref.cs +++ b/src/Uno.UI/UI/Xaml/FrameworkElement.netstdref.cs @@ -12,6 +12,8 @@ public partial class FrameworkElement : IEnumerable { bool IFrameworkElementInternal.HasLayouter => throw new NotSupportedException("Reference assembly"); + internal UIElement VisualParent => throw new NotSupportedException("Reference assembly"); + internal T AddChild(T child) where T : View => throw new NotSupportedException("Reference assembly"); internal T AddChild(T child, int index) where T : View => throw new NotSupportedException("Reference assembly");