but I found that encapsulating controls such as borders, text fields, etc. in User controls , helps keep things well-managed (not to mention code reduction), similarly using a resource dictionary to store styles / animations is useful for very large projects (remember, although local resources will take precedence when applying, so delete them, if they are not used)
In addition, using layout panels such as Stacks, grids, and docking panels allows you to collapse user controls when you donβt need it or otherwise (I also found that for some reason the grids allow overlapping controls (when the elements are ordered incorrectly in Grid Rows and Columns), which may lead to the fact that some elements will not be displayed in the design.
Plan your layout correctly and think about which panels are best for them, you need to come back much later and change can be annoying (although admittedly this happens).
Also, don't forget to use partial classes to properly structure your things, being able to read through 1000 lines of code to find something could be a nightmare.
source share