GroupviewItem Prism Click event to Command

Hi,
i want to use the Groupbar for Navigation. If i Click on a GroupViewItem i want to Navigate to another View. How can i bind a command to a GroupViewItem?

Best regards 
Brian

1 Reply

SK Senthil Kumaran Rajan Syncfusion Team September 11, 2018 10:58 AM UTC

Hi Brain 
 
Thank you for contacting Syncfusion Support 
 
We have prepared the sample that tries to meet your requirement. To invoke the command on clicking the GroupViewItem, the SelectedItemChanged event of GroupBar would be used. In our sample, we have binded the command with SelectedItemChanged which will used to open the new view on clicking each items. Please download the sample for the same from the following location: 
 
Code: [XAML] 
 
  <i:Interaction.Behaviors> 
                <local:EventToCommand Command="{Binding DataContext.ClickCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" EventName="SelectedItemChanged"/> 
            </i:Interaction.Behaviors> 
 
 
 
Please try this solution and let us know if it is helpful. 
 
Regards 
Senthil 


Loader.
Up arrow icon