
Hi,
I am trying to get a destinationstreeviewcontrol instance from the window. The Items are created by binding. If I ask the navbar.selectedpane i get an item from the 'someconnections' in stead of a reference to the destinationstreeviewcontrol which i need. What Am i doing wrong here? Thanks.
Style & Datatemplate:Element
Event
load window
I am trying to get a destinationstreeviewcontrol instance from the window. The Items are created by binding. If I ask the navbar.selectedpane i get an item from the 'someconnections' in stead of a reference to the destinationstreeviewcontrol which i need. What Am i doing wrong here? Thanks.
Style & Datatemplate:
<Style x:Key="NavigationGroupStyle" TargetType="{x:Type an:NavigationPane}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<ContentControl >
<Grid x:Name="ContentGrid" >
<controls:DestinationsTreeViewControl x:Name="TvUcDestinations" Tag="{Binding}" MouseLeftButtonUp="TvUcDestinations_MouseLeftButtonUp"/>
</Grid>
</ContentControl>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<an:NavigationBar x:Name="NavBar" HorizontalAlignment="Stretch"
IsHeaderContentVisible="True" SelectionChanged="NavBar_SelectionChanged" ItemContainerStyle="{StaticResource NavigationGroupStyle}" >
</an:NavigationBar>
Private Sub NavBar_SelectionChanged(sender As System.Object, e As System.Windows.Controls.SelectionChangedEventArgs)
Dim P As NavigationPane = NavBar.SelectedPane '????????
End Sub
NavBar.ItemsSource = My.SomeConnections