静的ListCollectionViewにバインドされたデータグリッドがあります
CompassLogViewクラス:
public static ListCollectionView Compasscollection {
get {
if (_compasscollection == null) {
_compasscollection =
new ListCollectionView(LogSession.CompassLogCollection);
}
return _compasscollection;
}
set { _compasscollection = value; }
}
バインディング
compassLogDataGrid.DataContext = CompassLogView.Compasscollection;
datagrid Xaml:
<DataGrid x:Name="compassLogDataGrid"
ItemsSource="{Binding}"
SelectionMode="Single"
IsSynchronizedWithCurrentItem="True"
SelectedItem="{Binding Path=Synchronizer.CurrentCompassLogDataItem}"
Style="{DynamicResource ResourceKey=dataGridStyle}">
...
</DataGrid>
SelectedItem
(LINE 5)currentCompassLogDataItem
は、クラス内のにバインドする必要がありますSynchronizer
。
試しましたが、無理そうです。助言がありますか?