c# - MaskedTextBox Focus Method Doesn't Work -


i using extended wpf toolkit in 1 of applications, , using maskedtextbox control. when call focus method on control, doesn't work. focus method works fine on textbox controls, seems maskedtextbox doesn't inherit textbox. know how programmatically give focus control?

see if works. had datepicker in silverlight. derive control maskedtextbox , provide following overrides.

public override void onapplytemplate() {     base.onapplytemplate();      _textbox = (textbox)base.gettemplatechild("textbox"); }  public new void focus() {     if (_textbox == null)         base.focus();     else         _textbox.focus(); }  private textbox _textbox; 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -