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
1925
xamTabControl tabitem properties bound to datacontext
posted

Please take a look at attached sample where I am trying to create tabitems dynamically and binding it to a view & viewmodel. I am also trying to set header of tab from the view but it does not update when I update in the text box of the view/viewmodel. Essentially header of tabitemex should be bind to the bound view's viewmodel property.

Parents
  • 1925
    Verified Answer
    posted

    I have managed to achieve it, however, I need advice in terms of best practice for assigning styles. Is it better to create a "ControlTemplate" to be assigned to "Template" property in style or create a style and assign it at run time as done in attachment.

    Solution is attached for your comments other if they are in similar situation.

    One more question is why tabitems are not taking the theme of TabControl?

    DynamicTabItemsWithViewModel.zip
Reply Children