Open
Description
openedon Sep 6, 2023
Describe the bug
Teaching tip is displayed out of screen when ShouldConstrainToRootBounds
is False
Steps to reproduce the bug
- Use the following XAML code
<Grid>
<ToggleButton
x:Name="button"
HorizontalAlignment="Right"
Content="Click me" />
<controls:TeachingTip
x:Name="teachingTip"
Title="I'm a teaching tip"
IsOpen="{x:Bind button.IsChecked.Value, Mode=OneWay}"
PreferredPlacement="Bottom"
ShouldConstrainToRootBounds="False"
Subtitle="The teaching tip subtitle"
Target="{x:Bind button}" />
</Grid>
- Run the application
- Maximize the window
- Click on the button
- The
TeachingTip
appears and is partially displayed out of the screen.
Expected behavior
The teaching tip should be fully visible on screen.
If the placement constraint cannot be fulfill , the code should adjust it to ensure that the content will be visible. For example, a Bottom
placement can be adjusted to BottomRight
.
Screenshots
NuGet package version
WinUI 2 - Microsoft.UI.Xaml 2.8.2
Windows version
No response
Additional context
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment