I have a class with a static method that returns a Dictionary. The signature of the method is as follows:
public static Dictionary<int, string> CodeLookup<T>() where T : EntityCodeBase
At the moment, I’m using this method to bind to my comboboxes in the code behind, like so:
this.cboState.ItemsSource = CodeCache.CodeLookup<StateCode>();
Would someone please be able to point me in the correct direction for doing this in XAML so that I can remove this kind of stuff from my codebehind?
Thanks,
Sonny
Not directly binding to a particular method. You should create a property and bound that to it.