SelectedDay の Date プロパティの値に基づいて、ListCollectionView 内の特定の項目に移動しようとしています。
VM
private Day _selectedDay;
public Day SelectedDay // the Name property
{
get { return _selectedDay; }
set { _selectedDay = value; RaisePropertyChanged(); }
}
public ObservableCollection<ShootingDay> AllShootingDayInfo {get; set;}
private ListCollectionView _shootingDayInfoList;
public ListCollectionView ShootingDayInfoList
{
get
{
if (_shootingDayInfoList == null)
{
_shootingDayInfoList = new ListCollectionView(AllShootingDayInfo);}
return _shootingDayInfoList;
}
set
{
_shootingDayInfoList = value; RaisePropertyChanged();
}
}
<Day>
オブジェクトには のプロパティがあり、それをオブジェクトのプロパティDate
と一致させたいので、内部のアイテムの一致する場所のアイテムに移動できます。Date
<ShootingDay>
ShootingDayInfoList
SelectedDay.Date
Date
ShootingDayInfoList
これを試しましたが、選択したアイテムが同じオブジェクトの一部ではないため、機能しません。
ShootingDayInfoList.MoveCurrentTo(SelectedDay.Date);
どうすればこれを機能させることができますか?私はこれらすべてに非常に慣れていません。