File tree 2 files changed +19
-0
lines changed
Uno.UI/UI/Xaml/Controls/ContentPresenter
Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,22 @@ public void Init()
61
61
_testsResources = new TestsResources ( ) ;
62
62
}
63
63
64
+ [ TestMethod ]
65
+ [ RunsOnUIThread ]
66
+ [ DataRow ( typeof ( Grid ) ) ]
67
+ [ DataRow ( typeof ( StackPanel ) ) ]
68
+ [ DataRow ( typeof ( Border ) ) ]
69
+ [ DataRow ( typeof ( ContentPresenter ) ) ]
70
+ public async Task When_SelfLoading ( Type type )
71
+ {
72
+ var control = ( FrameworkElement ) Activator . CreateInstance ( type ) ;
73
+
74
+ control . Width = 200 ;
75
+ control . Height = 200 ;
76
+
77
+ await UITestHelper . Load ( control ) ;
78
+ }
79
+
64
80
[ TestMethod ]
65
81
public async Task When_Binding_Within_Control_Template ( )
66
82
{
Original file line number Diff line number Diff line change @@ -662,6 +662,9 @@ protected override void OnApplyTemplate()
662
662
#if ANDROID || __IOS__
663
663
& & this is not NativeCommandBarPresenter // Uno specific: NativeCommandBarPresenter breaks if you inherit from the TP
664
664
#endif
665
+ // Uno Specific: Workaround to avoid creating a circular reference when TemplatedParent
666
+ // is incorrectly inherited. See https://github.com/unoplatform/uno/issues/17470.
667
+ && ! pTemplatedParent . IsLoaded
665
668
)
666
669
{
667
670
// bool needsRefresh = false;
You can’t perform that action at this time.
0 commit comments