WPF Sentinel objects and how to check for an internal type

后端 未结 2 1852
栀梦
栀梦 2020-12-28 13:58

As some of you have discovered, a new feature (?) appeared WPF 4, where the data binding engine may pass your custom control instances of the class MS.Internal.Named

相关标签:
2条回答
  • 2020-12-28 14:27

    This one?

    var disconnectedItem = typeof(System.Windows.Data.BindingExpressionBase)
        .GetField("DisconnectedItem", BindingFlags.Static | BindingFlags.NonPublic)
        .GetValue(null);
    
    0 讨论(0)
  • 2020-12-28 14:46

    In .NET 4.5, you can now compare against BindingOperations.DisconnectedSource.

    0 讨论(0)
提交回复
热议问题