Vidyano.View.LayoutAwarePage.StartLayoutUpdates C# (CSharp) Method

StartLayoutUpdates() public method

public StartLayoutUpdates ( object sender, RoutedEventArgs e ) : void
sender object
e Windows.UI.Xaml.RoutedEventArgs
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);
        }