Beispiel #1
0
        private static void AtDataContextChanged(FrameworkElement d, DependencyPropertyChangedEventArgs e)
        {
            var data = GetInternalData(d);

            if (data == null)
            {
                data = new BusyAdornerBehaviorData(d); SetInternalData(d, data);
            }
            var newValue = (ObjectVM)e.NewValue;

            data.DataContext = newValue;
        }
Beispiel #2
0
        private static void AtBindToBusyUserRequestChanged(FrameworkElement d, DependencyPropertyChangedEventArgs e)
        {
            var data = GetInternalData(d);

            if (data == null)
            {
                data = new BusyAdornerBehaviorData(d); SetInternalData(d, data);
            }
            var newValue = (bool)e.NewValue;

            data.BindToBusyUserRequest = newValue;
        }
Beispiel #3
0
        private static void AtIsBusyChanged(FrameworkElement d, DependencyPropertyChangedEventArgs e)
        {
            var data = GetInternalData(d);

            if (data == null)
            {
                data = new BusyAdornerBehaviorData(d); SetInternalData(d, data);
            }
            var newValue = (bool)e.NewValue;

            if (newValue)
            {
                var visual = new BusyAdornerVisual {
                    Style      = GetStyle(d),
                    Background = GetBackground(d),
                };
                data.Adorner = new BusyAdorner(d, visual);
            }
            else
            {
                data.Adorner = null;
            }
        }
Beispiel #4
0
 public static void SetInternalData(FrameworkElement element, BusyAdornerBehaviorData value)
 {
     element.SetValue(InternalDataProperty, value);
 }