I am new with WPF and C#,
I want to load templates dynamically . The themes must be selected based on the number of controls that should be necessary to display (some times could be 4,other 10,so the layout changes depending on this ).
I have been searching about data template selector or how to display different templates dynamically.
The point is that all the examples shows how to change the style theme at run time through an event ( like selecting an item in a list box or pressing a button).
What I want to do instead is load a template based on some flag or parameter when I run the app. For example,if the flag is true or parameter is >=1 , load a template specified for 4 controls. When the value of the flag/parameter is different load another.
is it possible? could you recommend me some example or document about it? are there any concept that am I missing ? (i.e some a layout type, another better stategy in the business logic ... )