Design of custom controls and Custom Controls
The code in the project has been written a lot. Recently I went back to see that there are too many simple projects. Wpf mvvm is a very practical mode. The premise is that the control must be supported. Wait, are there any controls that do not support binding? The basic controls are not listed here. However, in practice, you often encounter controls that need to be combined to put a group of controls together to complete a basic function. You also need to change the display format of controls according to different situations. Of course, these requirements can be implemented through style, template, and converter. In practice, I think the form of the control seems more effective. If developers focus on business logic, WPF-related code is always messy. In another way, if the developed WPF control is still reusable, the project's high cohesion and low coupling are easier to achieve? Although it is not a good practice to always consider reuse, in turn, it is not desirable to consider reuse at all.
In the design of custom space, dependency attributes, routing events, simple writing and writing seem to be very simple, but application in specific scenarios always encounter many problems. There is time to make a summary.