Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 ... )
Posted
Updated 4-Sep-14 3:08am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900