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
1585
Set Selected Group in XAML
posted

I was wondering if there was a way to set the selected group in XAML by binding a value to the property?

The reason why I ask, is after I rebind, using two way binding, the selected group gets changed to nothing. At this point I only have one group. So I rebind and the content goes away for the group. If I click on the group button however, the content returns into view, the group just needed to be reselected. Maybe I just did something wrong while binding? I just want to make sure the selected group state stays persitant after the rebinding...

 

 

Parents
No Data
Reply
  • 3071
    posted

    Hi,
    The content disappears because there is no selected group in the OutlookBar.
    The OutlookBar displays the content of selected group. The IsSelected property changes when you click on the group and the content appears.
    This sample demonstrates how you can use two way binding,
    <CheckBox x:Name="chkSelect" Content="Select" Grid.Column="1"/>
      <
    ig:XamOutlookBar DataContext="true">
      <ig:OutlookBarGroup Header="1"/>
      <ig:OutlookBarGroup Header="2" IsSelected="{Binding}"/>
      <ig:OutlookBarGroup Header="3"
          IsSelected
    ="{Binding ElementName=chkSelect, Path=IsChecked, Mode=TwoWay}"/>
    </
    ig:XamOutlookBar>
    but probably your scenario is different. Could you give us more details?
    Regards,
    Marin

Children
No Data