I have two user controls, the first of which contains a list that is tied to a list of clients that displays some simple information for each client.
The second user control, which I would like to get a more detailed idea of ββwhich client is selected in the list of the first usercontrol.
Is it possible to set the snap in the second control to snap to the selected item in the first user control?
My list:
<ListBox Name="lstCustomer" ItemsSource="{Binding Customers}" > <ListBox.Resources> <DataTemplate DataType="{x:Type MyApplication:Customers}"> <Label Grid.Row="0" Content="{Binding Customer.name}" FontSize="14" FontWeight="Bold" Padding="5" /> <Label Grid.Row="1" Grid.Column="0" Content="{Binding Customer.telephone}" Padding="10,5" /> </Grid> </Grid> </DataTemplate> </ListBox.Resources> </ListBox>
Detailed view of Usercontrol (still)
<Grid x:Name="containingGrid" DataContext="{Binding ElementName=lstCustomers, Path=SelectedItem}"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <TextBlock Text="{Binding Customer.name}" FontSize="23"/> </Grid>
Thanks Greg
gr-eg
source share