public TextBoxAdapter()
 {
     textBox = new wpf.System.Windows.Controls.TextBox {
         BorderThickness = new wpf::System.Windows.Thickness(), Background = wpf::System.Windows.Media.Brushes.Transparent
     };
     textBox.TextChanged      += (sender, e) => this.Text = textBox.Text;
     textBox.SelectionChanged += (sender, e) =>
     {
         this.CaretIndex      = textBox.CaretIndex;
         this.SelectionStart  = textBox.SelectionStart;
         this.SelectionLength = textBox.SelectionLength;
     };
 }
Exemplo n.º 2
0
 public TextBoxAdapter()
 {
     textBox = new wpf.System.Windows.Controls.TextBox { BorderThickness = new wpf::System.Windows.Thickness(), Background = wpf::System.Windows.Media.Brushes.Transparent };
     textBox.TextChanged += (sender, e) => this.Text = textBox.Text;
     textBox.SelectionChanged += (sender, e) =>
     {
         this.CaretIndex = textBox.CaretIndex;
         this.SelectionStart = textBox.SelectionStart;
         this.SelectionLength = textBox.SelectionLength;
     };
 }