I'm having a dataform which is binded to a property in my view-model in a Silverlight application, I've created my entity classes with WCF RIA Services and every property has the attribute of DisplayName which is shown in the dataform datafield label. what I need to do is to add a ":" at the end of every label in the custom datafields that I create. The reason I need this to happen is because I have a grid in my page which is binded to the list of current objects (e.g. Employees) and I don't want ":" at the end of the grid headers, but I also need ":" when I'm trying to edit or add a new employee.
This is what I've done so far, but it's not working.
public class CustomDataField : DataField
{
public CustomDataField()
{
}
public new object Label
{
get { return base.Label; }
set
{
base.Label = value;
if( value is string )
{
base.Label = (string)value + ":";
}
}
}
}