Possible Duplicate:
Bind to a method in WPF?
Is there a simple way to access a method form my code behind in XAML?
I've seen solutions that use ObjectDataProvider, but from my understanding they create a new instace of the given type and call the method of this object. This would be of no use for me, as I need to call the actual code of my class (datacontext is important for methods!)…
Route.xaml.cs: public string GetDifficultyName(int id);
Route.xaml: Displays a list of routes
Every route has a property "DiffId", that has to be passed to the method above and the result has to be set as value to a textbox -> resolves the id to a human readable description.