Exemplo n.º 1
0
        private static void OnBindedDatesChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            var calendar = obj as Calendar;
            var context  = GetBindContext(calendar);

            if (context == null)
            {
                SetBindContext(calendar, context = new CalendarDatesBindContext(calendar, e.NewValue as DatesCollection));
            }
            else
            {
                context.Collection = e.NewValue as DatesCollection;
            }
        }
Exemplo n.º 2
0
 public static void SetBindContext(DependencyObject element, CalendarDatesBindContext value)
 {
     element.SetValue(BindContextProperty, value);
 }