Describe the bug
I have no idea if this issue should go here (or to Microsoft.Toolkit.Win32), but since the source code is here, I post it here.
I'm using XamlIsland in WPF to host my UWP custom control.
However it occasionally crash with InvalidOperationException says something like "Cannot create new view because main window is not created." (the actual message is "無法建立新的檢視,因為尚未建立主視窗", this is just a translation.)
with a stacktrace:
at Windows.ApplicationModel.Core.CoreApplication.get_MainView()
at Microsoft.Toolkit.Uwp.UI.Helpers.ThemeListener.Settings_ColorValuesChanged(UISettings sender, Object args) in D:\a\1\s\Microsoft.Toolkit.Uwp.UI\Helpers\ThemeListener.cs:line 81
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
I haven't switch the theme, tho... I just leave it there running for several minute and it crashes.
Steps to Reproduce
Steps to reproduce the behavior:
- follow the WPF XamlIsland tutorial on Microsoft website
- run the program and wait
Expected behavior
no problem
Screenshots
probably don't need one...
Environment
NuGet Package(s):
<ItemGroup>
<PackageReference Include="Microsoft.Toolkit.UI.XamlHost" Version="6.0.0" />
<PackageReference Include="Microsoft.Toolkit.Wpf.UI.XamlHost" Version="6.0.0" />
</ItemGroup>
Package Version(s): 6.0.0
Windows 10 Build Number:
App min and target version:
Device form factor:
Visual Studio
Additional context
currently no
Describe the bug
I have no idea if this issue should go here (or to
Microsoft.Toolkit.Win32), but since the source code is here, I post it here.I'm using
XamlIslandin WPF to host my UWP custom control.However it occasionally crash with
InvalidOperationExceptionsays something like "Cannot create new view because main window is not created." (the actual message is "無法建立新的檢視,因為尚未建立主視窗", this is just a translation.)with a stacktrace:
I haven't switch the theme, tho... I just leave it there running for several minute and it crashes.
Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
no problem
Screenshots
probably don't need one...
Environment
NuGet Package(s):
Package Version(s): 6.0.0
Windows 10 Build Number:
App min and target version:
Device form factor:
Visual Studio
Additional context
currently no