Maybe by providing a property which will return a formatted value:
private int distance = 0;
public int Distance
{
get { return distance;}
set { distance = value; OnPropertyChanged("DistanceTxt"); }
}
public string DistanceTxt
{
get { return distance.ToString() + " meter"; }
}
Then when you bind to DistanceTxt you should get your distance
with trailing meter
. I've also added OnPropertyChanged
in Distance property so that when it changes, your value on the screen updates.