Exemplo n.º 1
0
 public override void OnValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 {
     if (!(sender is TextBox textbox))
     {
         return;
     }
     textbox.TextChanged -= Textbox_TextChanged;
     if ((bool)e.NewValue)
     {
         HasTextAttachedProperty.SetValue(textbox);
         textbox.TextChanged += Textbox_TextChanged;
     }
 }
Exemplo n.º 2
0
 private void Textbox_TextChanged(object sender, TextChangedEventArgs e)
 {
     HasTextAttachedProperty.SetValue((TextBox)sender);
 }