public override void BeginEdit() { base.BeginEdit(); RadTextBoxControlElement textBox = this.TextBox; RadControl radControl = this.EditorElement.ElementTree == null || this.EditorElement.ElementTree.Control == null ? (RadControl)null : this.EditorElement.ElementTree.Control as RadControl; if (radControl != null && TelerikHelper.IsMaterialTheme(radControl.ThemeName)) { textBox.StretchVertically = true; if (this.EditorElement.Parent != null) { this.EditorElement.Parent.UpdateLayout(); } } else { textBox.StretchVertically = this.TextBox.Multiline; } textBox.SelectAll(); textBox.Focus(); textBox.TextChanging += new TextChangingEventHandler(this.OnTextChanging); textBox.TextChanged += new EventHandler(this.OnTextChanged); textBox.MouseWheel += new MouseEventHandler(this.OnElementMouseWheel); textBox.KeyDown += new KeyEventHandler(this.OnElementKeyDown); textBox.KeyUp += new KeyEventHandler(this.OnElementKeyUp); textBox.Navigator.SelectionChanging += new SelectionChangingEventHandler(this.Navigator_SelectionChanging); }
public override void BeginEdit() { base.BeginEdit(); RadTextBoxControlElement textBox = this.TextBox; textBox.SelectAll(); textBox.Focus(); textBox.TextChanging += new TextChangingEventHandler(this.OnTextBoxTextChanging); textBox.TextChanged += new EventHandler(this.OnTextBoxTextChanged); textBox.KeyDown += new KeyEventHandler(this.OnTextBoxKeyDown); textBox.RadPropertyChanged += new RadPropertyChangedEventHandler(this.OnTextBoxRadPropertyChanged); }