I wish to use AngelSix's custom attached properties Code in a .NET Framework 4.7.2 class library. However, when I try to add an attached property to an object in a Xaml file, what I get from Intellisense in Visual Studio is local:BaseAttachedProperty`2.value and not the desired attached property like local:IsBusyProperty.Value. When I manually type local:IsBusyProperty.Value, the application crashes with the error message The method or operation is not implemented pointing to the attached property. I understand that the `2 means a generic type, with 2 generic parameters - alluding to the Base Class with two generic parameters:
public abstract class BaseAttachedProperty<Parent, Property> where Parent : new(){} But how do I get the correct attached property, that is, classes that implement the base class with generic parameters and not this cryptic local:BaseAttachedProperty`2.value message?
没有评论:
发表评论