コード例 #1
0
 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;
     }
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }