Hello all,
I have a UserControl and binds its Width property to a property of my own model class. The XMAL I'm using is :
<UserControl Width={Binding ModelWidth, Mode=TwoWay}/>
The ModelWidth is a normal CLR property where its type is double.
Normally it works fine.
However, now I want to make the width of the UserControl to "auto" if the value of ModelWidth is double.NaN.
I know there is a way to make a usercontrol to "auto" by C# code:
usercontrol.ClearValue(FrameworkElement.WidthProperty);
The best way I think is to use pure XAML + Converters. How can I achieve this?
Best regards,
Zach