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
We have updated all our projects to support .NET 9.0. As previously noted, our projects use a custom theme that functions well in .NET 8.0 and other frameworks but has been causing issues specifically in .NET 9.0.
We have logged this issue #10020 and received the recommendation: "The issue is due to a recent change to optimize DynamicResource usage (#5610). To prevent the crash, you can opt-out of this behavior by adding the following to your .csproj file:
This solution has resolved the issue in some sample projects. However, we still encounter problems in other cases when using themes:
In the SfScheduler control, adding an appointment that spans multiple days causes the app to freeze.
In TimeSelector, switching themes leads to app freezing.
Both cases work without issues in .NET Core 8.0.
Note: We have also included <RuntimeHostConfigurationOption Include="Switch.System.Windows.Controls.DisableDynamicResourceOptimization" Value="true" /> in the .NET 9.0 project ItemGroup.
We’ve attached sample projects demonstrating this issue and video references for Issue replication.
That's a bug in LoopingSelector.Balance where this.additionalItemsCount = (int) Math.Round(this.ActualHeight * 1.5 / actualItemHeight); causes additionalItemsCount to become 2147483647 when actualItemHeight is 0 which is 0 because ItemHeight becomes 0 because the control style is set to null when the control is removed from the visual or logical tree.
For 2. the code in SfSkinManager that changes the theme should better be rewritten to first add the new theme resources and then remove the old one. Otherwise everything will receive a null style etc. before receiving the new resources.
That exactly what is done in the ThemeManager of ControlzEx for example to avoid such issues.
@harshit7962 Was anything changed in regards to removal of items from the visual or logical tree? Was the style always reset to null in those cases?
Description
We have updated all our projects to support .NET 9.0. As previously noted, our projects use a custom theme that functions well in .NET 8.0 and other frameworks but has been causing issues specifically in .NET 9.0.
We have logged this issue #10020 and received the recommendation: "The issue is due to a recent change to optimize DynamicResource usage (#5610). To prevent the crash, you can opt-out of this behavior by adding the following to your
.csproj
file:This solution has resolved the issue in some sample projects. However, we still encounter problems in other cases when using themes:
SfScheduler
control, adding an appointment that spans multiple days causes the app to freeze.TimeSelector
, switching themes leads to app freezing.Both cases work without issues in .NET Core 8.0.
Note: We have also included
<RuntimeHostConfigurationOption Include="Switch.System.Windows.Controls.DisableDynamicResourceOptimization" Value="true" />
in the.NET 9.0
projectItemGroup
.We’ve attached sample projects demonstrating this issue and video references for Issue replication.
Could you please investigate further?
Samples.zip
Video references.zip
The text was updated successfully, but these errors were encountered: