c# - Using external helper classes -


apologies in advance suspect dumb question, can't seem search answer - results on internal helper classes.

i've got helper class takes in list of postcodes , determines regions match with:

namespace my.helpers {     public class postcodehelper     {         public string compilegeographies(string postcodecsv)         {            //internals go through codes , find out areas they're in            return string.join(", ", resultstring);         }     } } 

now, i'd able call directly in xaml, doing this:

xmlns:helpers="clr-namespace:my.helpers;assembly=my.helpers"  ....  <label content="helpers.postcodehelper.compilegeographies="{binding postcodes}" /> 

that not work, because syntax invalid demonstrates i'm after. possible spin external class, pass in argument through binding, , use result directly in xaml? if so, what's correct syntax?

what converter? use helper class inside of converter , pass postcode. should this:

in xaml:

<converter:postcodesconverter x:key="somename" /> 

now in content:

<label content="{binding postcodes, converter={staticresource somename}}" /> 

and converter should implement ivalueconverter interface. probs give shout :-).


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -