public StartLayoutUpdates ( object sender, |
||
sender | object | |
e | ||
return | void |
public void StartLayoutUpdates(object sender, RoutedEventArgs e)
{
var control = sender as Control;
if (control == null) return;
if (layoutAwareControls == null)
{
// Start listening to view state changes when there are controls interested in updates
SizeChanged += OnSizeChanged;
layoutAwareControls = new List<Control>();
}
layoutAwareControls.Add(control);
// Set the initial visual state of the control
VisualStateManager.GoToState(control, DetermineVisualState(ApplicationView.Value), false);
}