Hi Alessandro
Thank you for your update.
Query : how to get the items for the groupbar from a database table
Our GroupBar control is a ItemsControl similar to list control. From your query, we could understood that you want to populate the GroupBar item from Database table. You can populate the list of items in multiple way. However, here we have attached the demo that shows the different type of databinding in our GroupBar control. In which we show how the DataTable, Observablecollection, dynamic object and observable collection type of objects bounded to GroupBar control . Please find the sample from following location:
Also refer about how to populate items in GroupBar from following link:
Query : how to link the items to a command the opens a new windows or page, should i say, in the application. Sort of menu item. Is it possibile to view a little code snippet?
From your update, we could understood that you want to invoke the command with GroupBar. You can invoke the command for GroupBar as shown in the following code example. In this sample, we have used MouseDown event of Groupbar and bound the event using the interaction behavior.
Code:[XAML]
<syncfusion:GroupBar ItemsSource="{Binding GroupItemCollection}" VisualMode="StackMode" >
<syncfusion:GroupBar.ItemContainerStyle>
<Style TargetType="{x:Type syncfusion:GroupBarItem}" >
<Setter Property="Header" Value="{Binding Header}"/>
<Setter Property="Content" Value="{Binding Content}"/>
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
</Style>
</syncfusion:GroupBar.ItemContainerStyle>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
<command:EventToCommand
Command="{Binding MouseDownClick}" CommandParameter="{Binding InvokeParameter}"
PassEventArgsToCommand="True"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</syncfusion:GroupBar>
|
Similarly you can bound the commands and achieve your requirement. So please try this suggestion and let us know if you need any further assistance.
Regards,
Vijayalakshmi VR