我在C#开发Windows 8应用程序,并使用数据绑定绑定属性,方法
<CollectionViewSource
x:Name="departments"
Source="{Binding Departments}"
d:Source="{Binding AllGroups, Source={d:DesignInstance Type=data:Department, IsDesignTimeCreatable=True}}"/>
我这个类的属性绑定到我的UI,但是类也有这个方法,我需要
public String getProfessorsList()
我希望能够结合这样的方法......
<TextBlock Text="{Binding getHeads()}" FontSize="18" />
...但显然这不是允许。我怎样才能实现这个功能?
绑定到他们的getter返回方法调用自动实现的属性。 – tnw 2013-05-09 17:25:22