What are the recommended uses of IValueConverter? I've used it for things like converting a boolean property to a Visibility property but I'm wondering how far you should take it? Is it supposed to be only used to change representations of common types to UI specific types (bool to Visibility for example).
E.g., if I have a property in my class, EmployeeID, like:
public class EmployeeViewModel : INotifyPropertyChanged
{
public int? EmployeeID
{
get
{
return employeeID;
}
set
{
employeeID = value;
RaisePropertyChanged("EmployeeID");
}
}
}
and I want to display details for this employee, e.g. Name, location but to get these I would need to hit the Database, would this be wrong to put this into a Value Converter? Would it be better practice to store the values in the ViewModel and bind to them?