I want a property for the current item ICollectionView, how can I do this? ICollectionViewused to bind to a combo box, how can I bind another control to an item ICollectionView?
ICollectionView
Check out this cheat sheet . In particular, check the anchor character /that refers to the current item in the collection view.
/
IsSynchronizedWithCurrentItem ComboBox ( , ). :
<ComboBox ItemsSource="{Binding Names}" IsSynchronizedWithCurrentItem="True" /> <Button Content="{Binding Path=Names/}"/>
Give your ComboBox a name and bind SelectedItem to it.
For instance:
<ComboBox x:Name="MyComboBox" ItemsSource="{Binding MyList}" /> <Grid DataContext={Binding ElementName=MyComboBox, Path=SelectedItem> ... </Grid>