microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.3k stars 675 forks source link

Triggering TeachingTip light dismiss during opening breaks light dismiss #9881

Open jumhyn-browser opened 1 month ago

jumhyn-browser commented 1 month ago

Describe the bug

If the light dismiss behavior of a teaching tip is triggered during the presentation animation, it appears that the light dismiss layer is removed without actually dismissing the tip, which can result in a 'stuck' state for the tip.

Steps to reproduce the bug

Using the files below, the bug can be reproduced by running the app and rapidly double-clicking the "Click Me" button

MainWindow.xaml.cs:

<?xml version="1.0" encoding="utf-8"?>
<Window
    x:Class="App3.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App3"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <Button x:Name="MyButton" Tapped="Button_Tapped">"Click Me"</Button>
        <TeachingTip x:Name="MyTeachingTip" Target="{x:Bind MyButton}" IsLightDismissEnabled="True">"Teaching tip"</TeachingTip>
    </Grid>
</Window>
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Input;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace App3
{
    /// <summary>
    /// An empty window that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainWindow : Window
    {
        public MainWindow()
        {
            this.InitializeComponent();
        }

        private void Button_Tapped(object sender, TappedRoutedEventArgs e)
        {
            MyTeachingTip.IsOpen = !MyTeachingTip.IsOpen;
        }
    }
}

Expected behavior

The teaching tip is presented and can be dismissed by clicking on the background somewhere

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.5.5: 1.5.240627000

Windows version

No response

Additional context

No response

github-actions[bot] commented 1 month ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

jumhyn-browser commented 1 month ago

Issue seems potentially related but was closed as stale. Still an issue in WinUI 3