Now I have a problem with this structure. If I want to add one new template then I have to make changes in each and every template. As Template change is something like this
T1 - image1
T2 - image2
T3 - image1 image2
T4 - without image

So if I want to add one more template with Image3 then changes into templates are like this
T1 - image1
T2 - image2
T3 - image3
T4 - image1 and image2
T5 - image2 and image3
T6 - image1 and image3
T7 - Image1 and Image2 and Image3
T8 - without image.

So it goes in the n^2 manner, Is there any possibility that In XAML I use only one template and make changes into template run time one the basis of different condition.?

Thanks
h@rdik pancholi

Yana

In order to create DataTemplates dynamically, you should first build the XAML string that describes it and then pass the string to XamlReader.Load, here is a simple example in the ScheduleViewDataTemplateSelector SelectTemplate method:

Hardik

As I had defined in first thread when multiple templates will be there it will cause problem on development.
See my case is like this, I have 2 images and I need templates with combination of those images. So I will have 2^2 = 4 templates.

This work is very tedious as number of images increased. Here I not only images but other controls might be there. Here Appointments with different color also there.

So what I thought is I will create on common Template in which my all controls will be there, and as per my condition I want to hide control from this common template. With this image color of control also different.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.