mercredi 7 avril 2021

Accessing C# User Control from helper and builder classes to remove bulk code from the control's class is good or bad?

Let's say we have a User Control and we have a textbox a toolbar a label a grid and bunch of other controls. By default in designer class of these controls will be declared as private it is good practice to make them public so they can be accessed through instance of user control and action such as enable disable commands on toolbar or particular handlers for commands on toolbar should be added in that separate class so that control's own class looks small and good and every helper class is having single responsibility to manage single thing.

Aucun commentaire:

Enregistrer un commentaire