Exemplo n.º 1
0
 public void AddDateTimeControl(WpfEventManager wpfEventManager, DateTime defaultValue)
 {
     DateTimeInputControl = new DateTimeInputControlView
     {
         DefaultValue    = defaultValue,
         WpfEventManager = wpfEventManager,
     };
     DateTimeInputControl.ValueChanged += DateTimeInputControlView_ValueChanged;
     TheControlGrid.Children.Add(DateTimeInputControl);
 }
Exemplo n.º 2
0
        private static void OnPropsValueChangedHandler(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DateTimeInputControlView v = d as DateTimeInputControlView;

            if (e.Property.Name == nameof(DefaultValue))
            {
                v.SetDefaultValue((DateTime)e.NewValue);
            }
            else if (e.Property.Name == nameof(WpfEventManager))
            {
                v.SetWpfEventManager((WpfEventManager)e.NewValue);
            }
        }