Rotator with custom template per page

I am creating a wizard where each page will be unique.

I have a rotator setup as follows:


This works fine but I wish to have a different item template per page as the content will be unique per page.

How can I bind a custom item template per page?

I want to do something like this in my model...
where each item template is different.

Can you please recommend a good way to do this.


7 Replies

PA Paul Anderson S Syncfusion Team July 13, 2018 12:07 PM UTC

Hi Mark, 
 
Thank you for using Syncfusion products. 
 
We have analyzed your requirement with the code snippet provided and currently we don’t have support for having separate template for each item in SfRotator. Alternatively, we can assign different views directly from the view model to the SfRotatorItem’s View property without using ItemTemplate. 
 
We have prepared a sample based on your requirement and it is available in the below link. Please have a look at the sample and let us know if you have any further queries. 
 
Sample: http://www.syncfusion.com/downloads/support/forum/138702/ze/Rotaor138702-2126024978 
 
Please let us know if you have any concerns. 
 
Regards, 
Paul Anderson 



MA Mark July 13, 2018 12:36 PM UTC

Hi Paul,

Thanks for the sample.

Your sample unfortunately does not solve my problem. I need a different layout per page. Your sample has the same layout per page but with different content.

Here is an example of what I am trying to achieve:

As you can see each page is completely unique. You have given me an idea with a unique view model per page. I will update your sample if I get it right.

Thanks for the help.


PA Paul Anderson S Syncfusion Team July 16, 2018 10:59 AM UTC

Hi Mark, 
 
Thanks for the update. 
 
We have prepared a custom sample to achieve your requirement, inside the data template and for that we have used ContentPresenter to bind the views. Four different views are defined in the view model file and the view property is binded to the content presenter. Please find the sample from the below attachment and let us know if you have any concerns. 
 
 
Please let us know if you have any concern. 
 
Regards, 
Paul Anderson 



MA Mark July 16, 2018 11:37 AM UTC

That is awesome. Thank you.


PA Paul Anderson S Syncfusion Team July 17, 2018 07:02 AM UTC

Hi Mark,  
 
Thanks for the update. We are glad to help you. Please let us know if you need further assistance.  
 
Regards,  
Paul Anderson  



MA Mark July 17, 2018 11:16 AM UTC

Hi Paul,

I have created what I wanted to achieve, Wizard with unique pages with the pages bound to xaml templates.

Attached is my sample with it all working well in case some else want to have a sample.The project is a FreshMVVM project with a Rotator, Chart and Grid in a tabbed pop up container.

Thanks very much for your help along the way.

Attachment: FreshMVVMSFDataGrid_22a38275.zip


PA Paul Anderson S Syncfusion Team July 17, 2018 11:30 AM UTC

Hi Mark, 
 
Thanks for the update. 
 
We are glad to assist you in achieving your requirement and thanks for the sample project. 
 
Regards, 
Paul Anderson 


Loader.
Up arrow icon