Hi,
when i am trying to bind data using XamOutlookBar, data is not getting binded and throwing The Groups collection must be empty before using the GroupsSource error...can anyone help me regarding this?
That error message would appear if you have groups defined in xaml (or manually add them) and then attempt to bind to data to make the groups.
Did you define groups either in code behind or Xaml?
Nope i have not defined groups either in xaml or its code behind.....
here is my sample code which i tried.....
In Xaml:
<ig:XamOutlookBar x:Name="XamOutlookBar" Width="220"MinimizedWidth="38" Margin="12,90,939,12" HorizontalAlignment="Left" Grid.Column="1">
<ig:OutlookBarGroup>
<ig:OutlookBarGroup.HeaderTemplate>
<DataTemplate>
<TextBlock Text="UserNames"></TextBlock>
</DataTemplate>
</ig:OutlookBarGroup.HeaderTemplate>
<ig:OutlookBarGroup.ContentTemplate>
<TextBlock Tag="{Binding CompanyId}" Text="{Binding Name}"></TextBlock>
</ig:OutlookBarGroup.ContentTemplate>
</ig:OutlookBarGroup>
</ig:XamOutlookBar>
In Xaml.cs:
this.XamOutlookBar.GroupsSource = Data.ToList();
You are explicitly difining an OutlookBarGroup with the following XAML:
You can use GroupContentTemplate and GroupHeaderTemplate properties to specify to corresponding templates.
HTH,