私は次のモデルがあります:Infragistics XamDataGridを使用して、選択したアイテムをモデルにバインドする方法は?
public class Model : INotifyPropertyChanged
{
public ObservableCollection<ViewElement> Elements { get; set; }
public ViewElement CurrentElement { get; set; }
}
と親DataContext
は上記のモデルで、次のグリッド:
<dg:XamDataGrid DataSource="{Binding Path=Elements}" />
私はグリッドの選択された項目にCurrentElement
プロパティをバインドしたいです、私と同じように私はListView
:
<ListView x:Name="playbackSteps"
ItemsSource="{Binding Path=Elements}"
SelectedItem="{Binding Path=CurrentElement}" />
あなたはどうしたらいいですか?
これはinfragisticsフォーラムで相互投稿されています。http://news.infragistics.com/forums/p/24777/90741.aspx#90741 –