microsoft / microsoft-ui-xaml

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

WinUI3: ContentDialog is missing entrance animation #8476

Open Aurumaker72 opened 1 year ago

Aurumaker72 commented 1 year ago

Describe the bug

ContentDialog doesn't have an entrance animation, but has an exiting animation.

This is a possible regression, as the Windows 11 Settings app does feature ContentDialogs with entrance animations (see Windows Insider Program tab)

Steps to reproduce the bug

  1. Create a ContentDialog with an appropriate XamlRoot and arbitrary text
  2. Await the ContentDialog's ShowAsync method
  3. Observe the ContentDialog instantly appearing with no animation.

Expected behavior

The ContentDialog is expected to enter with an animation, similar to what is seen in Fluent.

Screenshots

https://github.com/microsoft/microsoft-ui-xaml/assets/48759429/269fc753-2394-42da-8a53-2a840eae0e92

NuGet package version

WinUI 3 - Windows App SDK 1.3.1: 1.3.230502000

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

IstvanKor commented 1 year ago

Maybe missing style assignment to your ContentDialog.

ContentDialog dialog = new ContentDialog(); .... dialog.Style = Application.Current.Resources["DefaultContentDialogStyle"] as Style; .... await dialog.ShowAsync();

Aurumaker72 commented 1 year ago

Maybe missing style assignment to your ContentDialog.

This indeed fixes the issue. It, on the other hand, begs the question: shouldn't this be assigned by default? The OOB experience is suboptimal enough as-is.

Balkoth commented 1 year ago

Seems strange to me that the default style is not applied automatically... Is this a problem on other controls too?

Aurumaker72 commented 1 year ago

Is this a problem on other controls too?

I haven't tested extensively, but all the basic controls (Button, CheckBox, ComboBox, RadioButton, Slider), collection controls, and navigation controls seem perfectly fine.

zadjii-msft commented 1 year ago

Looks like a dupe of #5573 to me.

IstvanKor commented 1 year ago

Looks like a dupe of #5573 to me.

5573 is related to WinUi 2.X, this issue to WinUI 3.

Aurumaker72 commented 1 year ago

Also, the proposed solution in #5573 does not work.

Balkoth commented 1 year ago

This is still an issue in Windows App SDK 1.3.2 (1.3.230602002)

lolametro commented 4 months ago

This is an issue again in Windows App SDK 1.6-experimental-1.

lolametro commented 2 months ago

This is still an issue in Windows App SDK 1.6-preview-1.

Just to clarify: the workaround above (https://github.com/microsoft/microsoft-ui-xaml/issues/8476#issuecomment-1546592773 assign the style) does not help here. In 1.5 it still worked fine. Please fix this regression before releasing 1.6!

lolametro commented 1 month ago

This is still an issue in the released Windows App SDK 1.6. 🙂

Balkoth commented 1 month ago

Super strange that the exit animation is still there...

kirwan-safesurfer commented 3 weeks ago

This is still an issue in the released Windows App SDK 1.6. 🙂

Also wanted to corroborate that this is a 1.6 regression not present in Windows App SDK 1.5.6.

lolametro commented 3 weeks ago

This was fixed in Windows App SDK 1.6.1 (1.6.240923002) 🙏 Probably as a side effect of #8402.

At least when setting the style like described in https://github.com/microsoft/microsoft-ui-xaml/issues/8476#issuecomment-1546592773. Without setting the style, there's still no animation, but at least the workaround works again.