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
Moving to Material Design 3. Having a problem with MaterialDesignSwitchToggleButton. The other ToggleButtons styles don't appear to have this exception.
When closing the parent window after this style has been loaded, I get an exception. I am guessing the exit animation is causing this. Not sure if it's because there is no from value?
I am still researching this and have not created a side project to test this yet. That will be next, but under pressure to finish this project, so will select a different style for the meantime.
Exception is crazy long, so will post the final part of it.
System.InvalidOperationException: 'System.Windows.Media.Animation.DoubleAnimation' cannot use default origin value of 'NaN'.
at System.Windows.Media.Animation.DoubleAnimation.GetCurrentValueCore(Double defaultOriginValue, Double defaultDestinationValue, AnimationClock animationClock)
at System.Windows.Media.Animation.DoubleAnimationBase.GetCurrentValue(Object defaultOriginValue, Object defaultDestinationValue, AnimationClock animationClock)
at System.Windows.Media.Animation.AnimationStorage.GetCurrentPropertyValue(AnimationStorage storage, DependencyObject d, DependencyProperty dp, PropertyMetadata metadata, Object baseValue)
at System.Windows.Media.Animation.AnimationStorage.EvaluateAnimatedValue(PropertyMetadata metadata, EffectiveValueEntry& entry)
at System.Windows.UIElement.EvaluateAnimatedValueCore(DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry& entry)
More to come - but opening this up just in case there is something obvious I may be missing.
It appears there's an environmental issue in my setup. For the demo, I had to revert to a standard checkbox to bypass the problem, but I plan to investigate further soon.
Could you please zip up that quick test, drop a link? I’d like to apply the application-specific settings to see if I can reproduce the issue. I suspect it might be related to how I’m applying styles. Since I'm integrating it as a plugin within another application, I couldn't apply the styles to the global App resources without causing conflicts in the host application (poisoned their visuals tree with my styles and colors). Currently, the style is loaded as a merged dictionary and applied throughout the child visual tree, including the popup with the same resource applied at the window level.
Interestingly, other Material Design visuals function correctly, and the issue seems to be isolated to the ToggleButton at this time.
I'll have more time next week to poke at this, as I really like the MD3 ToggleButton styles.
Bug explanation
Moving to Material Design 3. Having a problem with
MaterialDesignSwitchToggleButton
. The other ToggleButtons styles don't appear to have this exception.When closing the parent window after this style has been loaded, I get an exception. I am guessing the exit animation is causing this. Not sure if it's because there is no
from
value?MaterialDesignInXamlToolkit/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ToggleButton.xaml
Line 381 in 5df62fa
I am still researching this and have not created a side project to test this yet. That will be next, but under pressure to finish this project, so will select a different style for the meantime.
Exception is crazy long, so will post the final part of it.
More to come - but opening this up just in case there is something obvious I may be missing.
Xaml usage:
Version
5.1.0
The text was updated successfully, but these errors were encountered: