Skip to content

Teaching tip is displayed out of screen #8836

Open

Description

Describe the bug

Teaching tip is displayed out of screen when ShouldConstrainToRootBounds is False

Steps to reproduce the bug

  1. 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>
  1. Run the application
  2. Maximize the window
  3. Click on the button
  4. 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

image

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions