我有一个简单的C#类:
public class Dog {
public int Age {get; set;}
public string Name {get; set;}
}
我创建了一个扩展方法,就像这样:
public static class DogExt {
public static string BarkYourName(this Dog dog) {
return dog.Name + "!!!";
}
}
有没有办法将 BarkYourName
方法的结果绑定到 WPF 组件上?
基本上:有没有办法将其绑定到扩展方法上?