アタッチされたプロパティタイプにあるプロパティ変更コールバックからアタッチされたプロパティのインスタンスを取得する方法はありますか?
言い換えれば、あなたが持っている場合:
public class MyAttachedPropertyClass
{
public static readonly DependencyProperty MyProperty = DependencyProperty.RegisterAttached(
"My", typeof(int), typeof(MyAttachedPropertyClass), new FrameworkPropertyMetadata(0, OnMyPropertyChanged));
private static void OnMyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
//TODO: access instance of MyAttachedPropertyClass
}
}
タイプにある別のプロパティの値を設定できるように、MyAttachedPropertyClassのインスタンスにアクセスする必要があります。