c# - Bind property to method -
i developing windows 8 app in c# , using databinding
<collectionviewsource x:name="departments" source="{binding departments}" d:source="{binding allgroups, source={d:designinstance type=data:department, isdesigntimecreatable=true}}"/>
i can bind properties of class ui, class has method need
public string getprofessorslist()
i able bind method this...
<textblock text="{binding getheads()}" fontsize="18" />
...but not allowed. how can acheve functionality?
try adding getter-property returns method:
public string professorslist { { return this.getprofessorslist(); } }
and bind property:
<textblock text="{binding professorslist}" fontsize="18" />
Comments
Post a Comment