Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
XamTabControl and DataBinding
posted

Hi there

 

How do I binding a collection of WorkspaceViewModels with a XamTabControl?

 

What I want to do is to specify the DataTemplates for the ViewModels in the resource section and bind the ItemsSource property of the tab control to the ViewModelCollection.

 

Can this be done?

 

Thanks

 

-Rushui

Parents
  • 30945
    Verified Answer
    Offline posted

    Hello Rashui,

     

    Thank you for your post. I have been looking into it and if I understand correctly, you wish to show different template for the selected tab, based on the data that the selected tam contains. If this is correct, I can suggest creating a DataTempalteSelector and use it to the ContentTempalte property of the xamTabControl. I have created a sample application for you, that shows how you can show two different templates for the selected tab of the XamTabControl.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    TabControlContentTemplateSelector.zip
Reply Children