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
45
Binding the selected tab to a group in an OutlookBar
posted

I have a xamTabControl with 6 tabs and a xamOutlookbar with 6 groups.  As I select a different group in the xamOutlookbar, I would like the corresponding tab on the xamTabControl to become selected.  I'd like to do it through binding rather than adding code to an event of the xamOutlookBar, but I haven't been able to figure out how to bind these two properties.  Does anyone have any ideas?

Parents
No Data
Reply
  • 54937
    Offline posted

    There is no relation between the two controls so I don't think there is any property that you can bind between the two. If the outlookbar had a selectedindex then it may have been possible to bind that to the tabcontrol's selectedindex but the outlookbar allows the user to reorder the groups using the options dialog which actually changes the order of the groups in the control's Groups collection so this wouldn't have worked for your case anway. If you want to do this via xaml then you would probably have to write a custom IValueConverter (or possibly a multivalueconverter so you can pass along the other control) and bind the xamOutlookBar SelectedGroup to the xamTabControl SelectedItem. The code in that valueconverter would have to be your own logic because only you know which outlookbargroup is associated with which tab item.

Children
No Data