Im trying to bind a Syncfusion TaskBar to an ObservableCollection, and have a list of TaskBarItems. Using code-behind, items are added like this:
TaskBar taskBar = new TaskBar();
TaskBarItem taskBarItem1 = new TaskBarItem();
taskBarItem1.Header = "TaskBarItem1";
TextBlock textBlock1 = new TextBlock();
textBlock1.Text = "This TaskBar that have a TaskBarItem.";
taskBarItem1.Items.Add(textBlock1);
taskBar.Items.Add(taskBarItem1);
This XAML:
<syncfusion:TaskBar Grid.Row="1"
VerticalAlignment="Stretch"
ItemsSource="{Binding Path=DataContext.Categories, RelativeSource={RelativeSource AncestorType=localV:MainWindow}}">
<syncfusion:TaskBar.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=FirstName}"/>
</DataTemplate>
</syncfusion:TaskBar.ItemTemplate>
</syncfusion:TaskBar>
gives me a list of TaskBarItems, with Header showing FirstName, and nothing in the expandable area of any TaskBarItem. How can I make proper bindings/templates to see both Header and data in the expandable area?