Esempio n. 1
0
        private void OnBreakpointChanged(object sender, BreakpointChangedEventArgs e)
        {
            var width    = e.Width;
            var bindings = this.TryGetActive(width);

            if (bindings != null)
            {
                this.Active = bindings;
                this.RaiseActiveChanged(width, bindings);
            }
        }
Esempio n. 2
0
        protected void RaiseActiveChanged(double width)
        {
            var context = new BreakpointChangedEventArgs(width);

            if (this.breakpointChanged.Count > 0)
            {
                foreach (var handler in breakpointChanged)
                {
                    handler(this, context);
                }
                deferred = null;
            }
            else
            {
                this.deferred = new DeferredActiveWidth(width);
            }
        }