I have a large XAML project which will have a main TabControl and each tab “page” will have its own fairly complex set of elements and user interactions. (This is for a complex industrial control application)
I want the content of each tab to have its own XAML file, partly to avoid having one huge, unmanagable XAML file with everything, and partly so different designers can each work on their own tab.
What’s the “right” way to split a XAML project among multiple files? I’ve seen static resources and user controls suggested here on Stack Overflow but neither seem to be the “intended” purpose of those features. The former appears to be intended for resources like strings, brushes, colors, styles, templates etc, and the latter appears to be intended for custom controls. What is the “best practice” for splitting a large XAML project among multiple files and designers?
Thanks in advance.
try using DataTemplate’s as Resources (and therefore splitting up your resource files) and set their DataType property to a particular piece of UI corresponfding to a particular instance of a Data Object (if this suits your scenario)
http://msdn.microsoft.com/en-us/library/ms742521.aspx#Styling_DataType
Otherwise use UserControls, as this is now an accepted method for achieveing your requirements.