Hi
I'm trying to incorporate the XamOutlookBar in my Lightswitch application custom shell.
My code looks like this:
<DataTemplate x:Key="NavItemTemplate"> <ctrl:TreeView ItemsSource="{Binding Children}"> <ctrl:TreeView.ItemTemplate> <win:HierarchicalDataTemplate ItemsSource="{Binding}"> <TextBlock Text="{Binding Path=DisplayName}" MouseLeftButtonDown="NavigationItemLeftButtonDown"/> </win:HierarchicalDataTemplate> </ctrl:TreeView.ItemTemplate> </ctrl:TreeView></DataTemplate>
<DataTemplate x:Key="NavGroupTemplate"> <TextBlock Text="{Binding Path=DisplayName}"/></DataTemplate>
<ig:XamOutlookBar x:Name="XamOutlookBar" GroupsSource="{Binding NavigationItems}" GroupHeaderTemplate="{StaticResource NavGroupTemplate}" GroupContentTemplate="{StaticResource NavItemTemplate}" ShellHelpers:ComponentViewModelService.ViewModelName="Default.NavigationViewModel"></ig:XamOutlookBar>
If i remove the MouseLeftButtonDown from NavItemTemplate then i can see the navigation items of each group. However i need to set the click event for the navigation item.
I know that you have a custom shell for lightswitch also incorporating your OutlookBar. But i need more customization in my shell so your version is not enough.
Hello mheusser,
For the xamOutlookBar control in a LightSwitch application you can attach a sample on the thread on demonstrating the behavior when handling the MouseLeftButtonDown event. This will help to understand how the control is currently being used.
Let me know if you have any questions with this matter. Thank you.
Hello
The MouseLeftButtonDown is defined there to launch the content screen. For better understanding below LS navigation hierarchy (which is just 2 level):
- NavGroup1 - NavItem1 (MouseLeftButtonDown event) - NavItem2 (MouseLeftButtonDown event) - NavGroup2 - NavItem3 (MouseLeftButtonDown event) - NavItem4 (MouseLeftButtonDown event) and so on...
Within XamOutlookBar the NavGroups are the OutlookBarGroups.
This is just a follow up on the thread in regards to providing information and a sample on using the xamOutlookBar with the custom shell extension.