Hi. I'm trying to create a custom template for XamOutlookBar control.
Here is my xaml for custom template:
<igWPF:XamOutlookBar.Template>
<ControlTemplate TargetType="{x:Type igWPF:XamOutlookBar}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<igWPF:SelectedGroupHeader Grid.Row="0" x:Name="PART_SelectedGroupHeader" />
<igWPF:SelectedGroupContent Grid.Row="1" x:Name="PART_SelectedGroupContent" />
<igWPF:GroupAreaSplitter Grid.Row="2" x:Name="PART_Splitter" />
<igWPF:GroupsPresenter Grid.Row="3" x:Name="PART_NavigationArea" />
<igWPF:GroupOverflowArea Grid.Row="4" x:Name="PART_OverflowArea" />
</Grid>
</ControlTemplate>
</igWPF:XamOutlookBar.Template>
SelectedGroupHeader and SelectedGroupContent part work fine - they contain expected info from OutlookBarGroup. However, GroupsPresenter and GroupOverflowArea are not shown. WPF Inspector shows, that GroupsPresenter is empty. I also tried to use PART_NavigationArea partname, but that didn't help.
Could you help me, please? Thanks in advance.
Hello Mychail,
In order to display the groups in xamOutlookBar you should set the GroupsPresenter's ItemsSource. Add this code for GroupsPresneter in the OutlookBar's template:
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigationAreaGroups}"
You can check the default XamOutlookBar's style at OutlookBarBase.xaml file, which is located at the [InstallFolder]\WPF\DefaultStyles\OutlookBar folder.
Hope this helps you.
Best regards,
Anastas
Hi, Anastas
That solved my issue
Thanks
Great.
Thanks for choosing the Infragistics controls.