Hello,
i have an xamOutlookBar and i´m adding groups to it by data binding using data template in xaml. This is ok.
But i do it in xaml and i want to do it dynamically, by code.
And i don´t know how to bind the GroupHeaderTemplate and the GroupContentTemplate.
i want to do it cause the xamOutlookBar works in a user control and i want this user control completely generic so i can use it with any view model in a mvvm app.
I´m able to bind the xamOutlookBar but i am not able to acces to the groups properties.
this is the xaml-->
<ig:XamOutlookBar.GroupHeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Prueba}">
</TextBlock>
</DataTemplate>
</ig:XamOutlookBar.GroupHeaderTemplate>
<ig:XamOutlookBar.GroupContentTemplate>
<ListBox ItemsSource="{Binding Products}" DisplayMemberPath="ProductName" >
</ListBox>
</ig:XamOutlookBar.GroupContentTemplate>
and this is the code that i was able to develop-->
Private Sub UserControl_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim b As Binding = New Binding("Prueba")
b.Mode = BindingMode.OneWay Me.XamOutlookBar1.SetBinding(Infragistics.Controls.Menus.XamOutlookBar.GroupsSourceProperty, b)
End Sub
it´s possible to bind the GroupHeaderTemplate and the GroupContentTemplate by code to?
Any suggestion?
Thank you for your support.
Sincerely.
David A .
Hello David,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Hello Stefan,
thank you so much for your post it works perfect.
You are doing a really good work.
David Alonso.