Ejemplo n.º 1
0
 public void AddMultilineStringControl(WpfEventManager wpfEventManager, string defaultValue)
 {
     StringInputControl = new StringInputControlView
     {
         DefaultValue    = defaultValue,
         IsReadOnly      = false,
         IsMultiline     = true,
         WpfEventManager = wpfEventManager,
     };
     StringInputControl.ValueChanged += StringInputControlView_ValueChanged;
     TheControlGrid.Children.Add(StringInputControl);
 }
Ejemplo n.º 2
0
 public void AddStringControl(WpfEventManager wpfEventManager, string defaultValue, List <string> suggestions)
 {
     StringInputControl = new StringInputControlView
     {
         DefaultValue    = defaultValue,
         Sugestions      = suggestions,
         IsReadOnly      = false,
         IsMultiline     = false,
         WpfEventManager = wpfEventManager,
     };
     StringInputControl.ValueChanged += StringInputControlView_ValueChanged;
     TheControlGrid.Children.Add(StringInputControl);
 }
Ejemplo n.º 3
0
        private static void OnPropsValueChangedHandler(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            StringInputControlView v = d as StringInputControlView;

            if (e.Property.Name == nameof(DefaultValue))
            {
                v.SetDefaultValue((string)e.NewValue);
            }
            else if (e.Property.Name == nameof(Sugestions))
            {
                v.SetSugestions((List <string>)e.NewValue);
            }
            else if (e.Property.Name == nameof(IsMultiline))
            {
                v.SetIsMultiline((bool)e.NewValue);
            }
            else if (e.Property.Name == nameof(IsReadOnly))
            {
                v.SetIsReadOnly((bool)e.NewValue);
            }
            else if (e.Property.Name == nameof(WpfEventManager))
            {
                v.SetWpfEventManager((WpfEventManager)e.NewValue);
            }
            else if (e.Property.Name == nameof(WpfEventManager))
            {
                v.SetWpfEventManager((WpfEventManager)e.NewValue);
            }
            else if (e.Property.Name == nameof(IsCustomModule))
            {
                v.SetIsCustomModule((bool)e.NewValue);
            }
            else if (e.Property.Name == nameof(CustomModuleName))
            {
                v.SetCustomModuleName((string)e.NewValue);
            }
        }