How to Add Data Dource to PaneHeader

Environment

Product Version 2019.3.917
Product RadNavigationView for WPF

Description

How to bind a collection of items to the pane header.

Solution

You can achieve the desired result by using the PaneHeaderTemplate property of the control and using a RelativeSource binding to point to your header collection.

  <telerik:RadNavigationView.PaneHeaderTemplate> 
      <DataTemplate> 
          <StackPanel Orientation="Horizontal"> 
              <TextBlock Text="{Binding}" VerticalAlignment="Center" /> 
              <ItemsControl ItemsSource="{Binding DataContext.HeaderItems, RelativeSource={RelativeSource AncestorType=telerik:RadNavigationView}}" /> 
          </StackPanel> 
      </DataTemplate> 
  </telerik:RadNavigationView.PaneHeaderTemplate> 

See Also

Header and Footer

In this article
Not finding the help you need? Improve this article