Example #1
0
 public void AddBooleanControl(WpfEventManager wpfEventManager, bool defaultValue)
 {
     BooleanInputControl = new BooleanInputControlView
     {
         DefaultValue    = defaultValue,
         WpfEventManager = wpfEventManager,
     };
     BooleanInputControl.ValueChanged += BooleanInputControlView_ValueChanged;
     TheControlGrid.Children.Add(BooleanInputControl);
 }
Example #2
0
        private static void OnPropsValueChangedHandler(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BooleanInputControlView v = d as BooleanInputControlView;

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