c# - How to use controls from derived class in base window class -


this question has answer here:

i creating base window class want use store common code our windows. know windows have text box , combo box used same purpose.

public abstract class windowbase : window {  protected virtual void savetextboxvalue() { }  protected textbox textboxnotes { get; set; } }  public class mywindow : windowbase { public mywindow() { initializecomponent(); textboxnotes = txtnotes; // have set in every inherited class } } 

is there way use textbox mywindow classes without need set in every conrete class?

in constructor of abstract class set finding first textbox in window or whatever way u want identify text box.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -