Im searching for the best practice (or any working solution) for the following scenario:
I have an Employee
class:
public class Employee
{
public string DisplayName
{ get; set; }
// It is important that this method has a parameter
public string GetSomething(string param)
{ return param + DisplayName; }
}
I have a List<Employee>
type object which is bound to a ComboBox in XAML.
The DisplayName for each employee is correctly showing in the ComboBox, but how can I show the return value of the GetSomething method with an exact parameter for all employees for each employee instead of the DisplayName?
Binding to a method is OK, but how can I bind to multiple instances (for each employee object in the list)? With the ObjectDataProvider
I can only bind to one exact instance (or a class), not each employee object of the employee list.