I create a custom control in WPF, this is a very non-original example of a stock ticker that I get from the Control type. My question is: are there any recommended design patterns for the controls themselves (as opposed to the application)? I use MVVM for the application as a whole, but just wandered if it is good or bad practice to use such a design pattern with the control itself.
My reasons to think about using MVVM for a control:
- This is a relatively complex control, because it has the ability to graph and the dependency properties of Midprice, Average, etc. etc.
- To have ViewMOdel as part, it will simplify (or even possibly) unit testing
- Makes the whole coding process simpler, especially since I have an order for the ObservableCollection of point types.
Any thought on this subject would be brilliant. I just don't know if this is good practice or not.
Many thanks
source
share