You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you set the TitleBar back button visible through C# (not XAML) the first time, it allows you to drag the window by the back button and removes the back button animation.
Steps to reproduce the bug
Create a titlebar control in XAML with the back button IsBackButtonVisible false
In the .xaml.cs file, set the IsBackButtonVisible to true
Observe that you can drag the window by the back button and the animation is removed
Setting the back button in the titlebar control should retain the same behaviors as when setting it through XAML.
Screenshots
20250213-2248-11.1859949.mp4
NuGet package version
WinUI 3 - Windows App SDK 1.7 Preview 1: 1.7.250208002-preview1
Windows version
Windows 11 (24H2): Build 26100
Additional context
If you ser the back button invisible and set it visible it again, it works like normal as expected. The first time you make the back button visible is when it is in this bugged state.
The text was updated successfully, but these errors were encountered:
RyanLua
changed the title
Enabling the titlebar control back button through C# allows it to be dragged and removes animation
Enabling the titlebar control back button through C# for the first time allows it to be dragged and removes animation
Feb 13, 2025
@RyanLua I'm able to reproduce the issue, but the first repro step is incorrect (should be IsVisible, not IsEnabled). It also seems it's missing from your repro project?
Here are the repro steps I used:
Launch the app (IsBackButtonVisible is set to False in XAML).
Set IsBackButtonVisible to true in C# with the toggle.
Click the Back button; it drags the window and no BackRequested event.
Click it again; the BackRequested event gets triggered but animation/pressed state is not shown.
Maximize the window or toggle on/off again fix it.
In case it's helpful to MS, this seems to have regressed between Experimental3 and Preview1
RyanLua
changed the title
Enabling the titlebar control back button through C# for the first time allows it to be dragged and removes animation
Setting the titlebar control back button visible through C# for the first time allows it to be dragged and removes animation
Feb 14, 2025
Describe the bug
When you set the TitleBar back button visible through C# (not XAML) the first time, it allows you to drag the window by the back button and removes the back button animation.
Steps to reproduce the bug
IsBackButtonVisible
false.xaml.cs
file, set theIsBackButtonVisible
to trueMinimum reproduction:
https://github.com/RyanLua/TitlebarTest/tree/main/TitlebarTest
Expected behavior
Setting the back button in the titlebar control should retain the same behaviors as when setting it through XAML.
Screenshots
20250213-2248-11.1859949.mp4
NuGet package version
WinUI 3 - Windows App SDK 1.7 Preview 1: 1.7.250208002-preview1
Windows version
Windows 11 (24H2): Build 26100
Additional context
If you ser the back button invisible and set it visible it again, it works like normal as expected. The first time you make the back button visible is when it is in this bugged state.
The text was updated successfully, but these errors were encountered: