Key
で可能なように、カスタム クラス内でにバインドすることは可能Dictionary
ですか?
このバインディングでにバインドできますDictionary
:
"Binding MyDictionary[MyKey]"
Dictionary
しかし、私は次のようなカスタムクラスを使用したくありません:
public class DataGridField : INotifyPropertyChanged
{
[Required]
[Key]
public string Key { get; set; }
private object value;
public object Value
{
get
{
return this.value;
}
set
{
this.value = value;
this.OnPropertyChanged("Value");
}
}
}
ObservableCollection
で行うのと同じ方法で、このクラスのオブジェクトにアクセスしたいと思いますDictionary
。これを達成する方法はありますか?