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
525
OutlookBarGroup not working with CollectionView?
posted

Dear Support,

I'm trying to bind the OutlookBar-Groups-Collection to a Collection view. The Groups are shown, but selection of a group does not fire the "CurrentChanged"-Event of the CollectionView.

Furthermore .MoveCurrentToLast does not select the last Item in your OutlookBar. It does not work in any direction.

In order to be sure that everythin is correct, I additionally bound a ListBox to the SAME Collection and everything works fine here. I assume that your OutlookBar does not work with MVVM.

Please check the following XAML  and give us a hint how to combine your Product and a CollectionView:  OutlookEntries is the collectionView

 

        <igOutlookBar:XamOutlookBar DataContext="{Binding OutlookEntries, Mode=TwoWay}"   GroupsSource="{Binding}" DockPanel.Dock="Left"  HorizontalAlignment="Left" Name="OutBar" Width="200" IsTabStop="False" MaxWidth="600" MinWidth="100" Theme="Generic">
              
            <igOutlookBar:XamOutlookBar.Resources>
      
                <Style TargetType="{x:Type igOutlookBar:OutlookBarGroup}">
                    <Setter Property="Header" Value="{Binding Header}"/>
                    <Setter Property="SmallImage" Value="{Binding SmallImage}"/>
                    <Setter Property="LargeImage" Value="{Binding LargeImage}"/>
                </Style>
            </igOutlookBar:XamOutlookBar.Resources>
        </igOutlookBar:XamOutlookBar>

 

Parents
  • 54937
    Offline posted

    voks said:
    I'm trying to bind the OutlookBar-Groups-Collection to a Collection view. The Groups are shown, but selection of a group does not fire the "CurrentChanged"-Event of the CollectionView.

    Furthermore .MoveCurrentToLast does not select the last Item in your OutlookBar. It does not work in any direction.

    In order to be sure that everythin is correct, I additionally bound a ListBox to the SAME Collection and everything works fine here. I assume that your OutlookBar does not work with MVVM.

    Essentially what you are looking for is IsSynchronizedWithCurrentItem support in XamOutlookBar like the WPF Selector class (from which ListBox derives) has. I don't agree with saying that not having it means the control does not support MVVM. I would recommend submitting a suggestion for building support for this into the control. For now it is feasible to write your own attached behavior that does this. I have attached an example of doing so.

    TestProject.zip
Reply Children