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 I run my Application by Visual Studio with both Debug / Release mode, It worked as expected. But When I packaged it and run it, the SettingsExpander doesn't work as expected. It was crashed and exited.
I try to use the App.UnhandledException to get the error, and I get the Error text:
System.Runtime.InteropServices.COMException (0x800F1000): 没有检测到已安装的组件。
Cannot apply a Style with TargetType 'CommunityToolkit.WinUI.Controls.SettingsCard' to an object of type 'Microsoft.UI.Xaml.Controls.CheckBox'.
at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementMethods.set_Style(IObjectReference _obj, Style value)
at Microsoft.UI.Xaml.FrameworkElement.set_Style(Style value)
at CommunityToolkit.WinUI.Controls.SettingsExpander.ItemsRepeater_ElementPrepared(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_global__Microsoft_UI_Xaml_Controls_ItemsRepeater__global__Microsoft_UI_Xaml_Controls_ItemsRepeaterElementPreparedEventArgs_.EventState.<GetEventInvoke>b__1_0(ItemsRepeater sender, ItemsRepeaterElementPreparedEventArgs args)
at ABI.Windows.Foundation.TypedEventHandler`2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)
1. Use Visual Studio 2022 Community to create a Blank App, Packaged (WinUI3 in Desktop), and use NuGet to add the SettingsControls.
2. Copy the Xaml and C# code to replace what is provided by default in the MainWindow.xaml and MainWindow.xaml.cs
3. And Run it, don't use it in VS2022, open the StartMenu, find it and open it.
4. Maybe you can get the same error.
Expected behavior
The SettingsExpander runs as excepted.
Screenshots
No response
Code Platform
UWP
WinAppSDK / WinUI 3
Web Assembly (WASM)
Android
iOS
MacOS
Linux / GTK
Windows Build Number
Windows 10 1809 (Build 17763)
Windows 10 1903 (Build 18362)
Windows 10 1909 (Build 18363)
Windows 10 2004 (Build 19041)
Windows 10 20H2 (Build 19042)
Windows 10 21H1 (Build 19043)
Windows 10 21H2 (Build 19044)
Windows 10 22H2 (Build 19045)
Windows 11 21H2 (Build 22000)
Other (specify)
Other Windows Build number
Windows 11 24H2 (Build 26090.112)
App minimum and target SDK version
Windows 10, version 1809 (Build 17763)
Windows 10, version 1903 (Build 18362)
Windows 10, version 1909 (Build 18363)
Windows 10, version 2004 (Build 19041)
Windows 10, version 2104 (Build 20348)
Windows 11, version 22H2 (Build 22000)
Other (specify)
Other SDK version
No response
Visual Studio Version
2022, Preview
Visual Studio Build Number
17.10.0 Preview 2.0
Device form factor
Desktop
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
The text was updated successfully, but these errors were encountered:
Describe the bug
First, My English is poor, the next content maybe have some grammar error, I'm sorry about it.
As the Title say, I can't use the SettingsExpander when I want to open it and get the extra content.
My XAML File is like:
And my C# Code is like:
When I run my Application by Visual Studio with both Debug / Release mode, It worked as expected. But When I packaged it and run it, the SettingsExpander doesn't work as expected. It was crashed and exited.
I try to use the
App.UnhandledException
to get the error, and I get the Error text:When I look at the offical website https://learn.microsoft.com/zh-cn/dotnet/communitytoolkit/windows/settingscontrols/settingsexpander , I find the similar way of using the SettingsExpander, So I think maybe It's a bug.
Steps to reproduce
Expected behavior
The SettingsExpander runs as excepted.
Screenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
Windows 11 24H2 (Build 26090.112)
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022, Preview
Visual Studio Build Number
17.10.0 Preview 2.0
Device form factor
Desktop
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
The text was updated successfully, but these errors were encountered: