-
Notifications
You must be signed in to change notification settings - Fork 771
Description
Describe the bug
There are differences when having a list that can be ordered which varies if you are running WindowsAppSDK v1.7 or v1.8, unpackaged or packaged. The issue appears when the user is running the application as an elevated process. To debug this you need to run visual studio as admin.
The exception message is just "catastrophic failure"
When running as a regular user,
Packaged | Unackaged | |
---|---|---|
1.7.250909003 | ✅ | ✅ |
1.8.250907003 | ✅ | ✅ |
When running as an elevaeted process (run as admin)
Packaged | Unackaged | |
---|---|---|
1.7.250909003 | ✅ | ❌ (app throws exception, "catastrophic failure") |
1.8.250907003 | ✅ | 🤷♂️ (app does not crash, however app cannot reorder list) |
The code used in the apps is as follows
<ListView
ItemsSource="{x:Bind Items, Mode=OneWay}"
ScrollViewer.VerticalScrollMode="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
CanReorderItems="True"
AllowDrop="True"
SelectionMode="None">
<ListView.ItemTemplate>
<DataTemplate x:DataType="x:String">
<StackPanel Orientation="Horizontal">
<FontIcon Glyph="" FontSize="12" FontWeight="Bold" />
<TextBlock Text="{x:Bind Mode=OneWay}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
public ObservableCollection<string> Items { get; } = new ObservableCollection<string>()
{
"Item 1",
"Item 2",
"Item 3",
"Item 4",
"Item 5",
};
Steps to reproduce the bug
Go to repo: https://github.com/beeradmoore/WindowsAppSDK_ReorderListIssue
There are 4 solutions each in a named folder. Visual Studio needs to be running as admin in all 4 cases. (I now realise I should have made 1 solution with 4 packages in it, apologies)
Running each project and attempting to re-order the list gives differnet results.
Expected behavior
You can re-order the list in v1.7 and v1.8, unpackaged and packaged apps, while running elevated or not.
Screenshots
No response
NuGet package version
Windows App SDK 1.8.0: 1.8.250907003
Packaging type
Unpackaged, Packaged (MSIX)
Windows version
Windows 11 version 24H2 (26100, June 2025 Update)
IDE
Visual Studio 2022
Additional context
This is currently a bug that was reported in my app, DLSS Swapper. If I were to update to v1.8 I would not get the crash however the users would not be able to re-order their lists.
Additionally we can't update to v1.8 because of the existing issues with unpackaged apps using translations breaking in v1.8 (see microsoft/WindowsAppSDK#5832 and microsoft/WindowsAppSDK#5746)