public void StopLayoutUpdates(ILayoutAwareControl control) { if (control == null || this._layoutAwareControls == null) return; this._layoutAwareControls.Remove(control); if (this._layoutAwareControls.Count == 0) { // Stop listening to view state changes when no controls are interested in updates this._layoutAwareControls = null; Window.Current.SizeChanged -= this.WindowSizeChanged; } }
public void StopLayoutUpdates(ILayoutAwareControl control) { if (control == null || this._layoutAwareControls == null) { return; } this._layoutAwareControls.Remove(control); if (this._layoutAwareControls.Count == 0) { // Stop listening to view state changes when no controls are interested in updates this._layoutAwareControls = null; Window.Current.SizeChanged -= this.WindowSizeChanged; } }
public void StartLayoutUpdates(ILayoutAwareControl control) { if (control == null) return; if (this._layoutAwareControls == null) { // Start listening to view state changes when there are controls interested in updates Window.Current.SizeChanged += this.WindowSizeChanged; this._layoutAwareControls = new List<ILayoutAwareControl>(); } this._layoutAwareControls.Add(control); // Set the initial visual state of the control control.SetLayout(ApplicationView.Value); }
public void StartLayoutUpdates(ILayoutAwareControl control) { if (control == null) { return; } if (this._layoutAwareControls == null) { // Start listening to view state changes when there are controls interested in updates Window.Current.SizeChanged += this.WindowSizeChanged; this._layoutAwareControls = new List <ILayoutAwareControl>(); } this._layoutAwareControls.Add(control); // Set the initial visual state of the control control.SetLayout(ApplicationView.Value); }