File tree 2 files changed +12
-0
lines changed
src/Uno.UI/UI/Xaml/Controls
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,14 @@ partial void OnIsOpenChangedPartialNative(bool oldIsOpen, bool newIsOpen)
91
91
XamlRoot = WinUICoreServices . Instance . ContentRootCoordinator . Unsafe_IslandsIncompatible_CoreWindowContentRoot ? . XamlRoot ;
92
92
}
93
93
#endif
94
+ if ( this . IsDependencyPropertySet ( Canvas . ZIndexProperty ) )
95
+ {
96
+ Canvas . SetZIndex ( PopupPanel , Canvas . GetZIndex ( this ) ) ;
97
+ }
98
+ else
99
+ {
100
+ PopupPanel . ClearValue ( Canvas . ZIndexProperty ) ;
101
+ }
94
102
95
103
// It's important for PopupPanel to be visible before the popup is opened so that
96
104
// child controls can be IsFocusable, which depends on all ancestors (including PopupPanel)
Original file line number Diff line number Diff line change @@ -1429,6 +1429,8 @@ private sealed class TextBoxCommand(Action action) : ICommand
1429
1429
1430
1430
private class CaretWithStemAndThumb : Grid
1431
1431
{
1432
+ private const int DefaultZIndex = 10000 ; // Very high ZIndex to keep carets on top of other popups.
1433
+
1432
1434
// This is equal to the default system accent color on Windows.
1433
1435
// This is, however, a constant color that doesn't depend on the
1434
1436
// current system accent color. Changing the accent color does NOT
@@ -1498,6 +1500,8 @@ public void ShowAt(Point p, XamlRoot xamlRoot)
1498
1500
XamlRoot = xamlRoot
1499
1501
} ;
1500
1502
1503
+ Canvas . SetZIndex ( _popup , DefaultZIndex ) ;
1504
+
1501
1505
_popup . HorizontalOffset = p . X ;
1502
1506
_popup . VerticalOffset = p . Y ;
1503
1507
if ( ! _popup . IsOpen )
You can’t perform that action at this time.
0 commit comments