Quantcast
Channel: User Sinatr - Stack Overflow
Viewing all articles
Browse latest Browse all 601

Comment by Sinatr on Use the subclass of a usercontrol as a base class for new usercontrols

$
0
0
You can subsclass FlowLayoutPanel and put your methods there. Then multiple of custom controls should be editable in winforms designer without much effort. But I suggest you to rethink your design and rather separate view from the logic. In WPF it's called MVVM. In short: instead of keeping your data in lets say ListBox and using its instance in every method that needs access or edit data, you'll have List<Item>, which is much easier to use everywhere and can be bound to anything in the view.

Viewing all articles
Browse latest Browse all 601

Trending Articles