Tuesday, January 13, 2009

WPF Dynamic Auto Width

If you want to update your WPF interface dynamically and need to set an element's width to "Auto" as it's called in XAML, you can just set it's width to Double.NaN:


element.Width = Double.NaN;

No comments:

Post a Comment