Reputation: 590
Create own TextBox, Button etc control as own control using User control in C# Windows application, is this good idea? I wanted make consistency for through out the application. Suppose if I want to change the Textbox border color then all forms textbox updated with this changes. It's just an example. Please suggest me.
Upvotes: 0
Views: 936
Reputation: 44316
I don't recommend using UserControl just for consistency. If application skinning is what you are after, look into WPF. It makes it relatively simple to skin an application (or even a window, or smaller groups)
Here is an article on skinning with WPF: http://www.codeproject.com/Articles/19782/Creating-a-Skinned-User-Interface-in-WPF
Another alternative, staying within Windows Forms, is creating a class that inherits from TextBox, and using that class throughout the application. The Factory pattern would work well here. You could even adapt it to multiple skins.
Upvotes: 2
Reputation: 880
It's not a bad idea to provide custom controls that match your "User Experience" (UX). It really just depends on what you are trying to accomplish with your program.
Upvotes: 1