public SingleLineTextControl(IValueConverter converter) { InitializeComponent(); var binding = new Binding("Value") { Converter = converter }; ValueHolderControl.SetBinding(TextBox.TextProperty, binding); }
public PasswordTextControl() { InitializeComponent(); ValueHolderControl.PasswordChanged += (sender, args) => { Password = ((PasswordBox)sender).SecurePassword; }; var binding = new Binding("Value") { Mode = BindingMode.TwoWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged }; ValueHolderControl.SetBinding(PasswordProperty, binding); }
private void SingleLineTextControl_OnLoaded(object sender, RoutedEventArgs e) { ValueHolderControl.SelectAll(); }