Force xaml update from C# code
-
Hi, I have a xaml window that contains two different stackpanels and only one stackpanel can be shown at the same time. I use a Stackpanel Visibility="{Binding State,Converter={StaticResource StateVisibility}}" do determine which one to show and StateVisibility is declared as IValueConverter public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture). The problem is that after a sleep, this converter is not called, can I in the C# code force a call to this converter? Regards Olof
-
Hi, I have a xaml window that contains two different stackpanels and only one stackpanel can be shown at the same time. I use a Stackpanel Visibility="{Binding State,Converter={StaticResource StateVisibility}}" do determine which one to show and StateVisibility is declared as IValueConverter public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture). The problem is that after a sleep, this converter is not called, can I in the C# code force a call to this converter? Regards Olof
After a sleep? what sleep? Anyways, the converter will only get called when "State" changes. "State" must be a DP or the view needs to implement INPC.