c# - Read all textBox in form in my custom textbox -


i work custom textbox in winform project, added property in custom textbox:

private textbox _nextcontrol;  public textbox nextcontrol  {     set { _nextcontrol=value; }     { return _nextcontrol; } } 

and got result form 2 textbox(textbox1 , textbox2) in custom textbox properties property nextcontrol; can see textboxes in form:

enter image description here

in case property nextcontrol show textbox in form select next control.

but when want same in new wpf costum textbox got same condition(2 textboxes, textbox1 , textbox2):

enter image description here

why don't have same result? , how in wpf project?


update:

for more explanation, in winform project use property nextcontrol select next control ui properties.

protected override void onkeydown(keyeventargs e)  {     if(e.keycode==keys.down)          // select next textbox chosen in textbox option         _nextcontrol.select();  } 

because can choose name of next textbox in ui, i don't want code.

but not work in wpf: can't see names of textboxes in window property nextcontrol(automatically in winform if choose type of property = textbox).

p.s.: custom textbox inherited system.windows.controls.textbox.


update:

i uploded winform project custom textbox [here] of sample project want wpf can behaves same.

i've updated link of sample.

quick in code telling me windows form user control not compatible wpf, specially keydown event in windows form parses parameter "keyeventargs e", system.windows.form.key wpf parses "system.windows.input.key" , wpf doesn't have "select() method textbox. wpf binds controls in different way winform, therefore winfromusercontrol not work in wpf forms.

if want use similar behavior in wpf form, have write 1 supported in wpf.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -