I am trying to bind an XmlDataProvider with a Source attribute to a static function in another form.
Here's XmlDataProvider line -
<XmlDataProvider x:Key="Lang" Source="/lang/english.xml" XPath="Language/MainWindow"/>
I would like it's Source attribute to be binded to a static function called: "GetValue_UILanguage" in a form called: "Settings"
See this question's answer for a converter that allows you to bind to methods.
You could probably modify it to be able to access static methods of any class as well.
Edit: Here's a modified converter that should find the method via reflection.
(Note: You would be better off using a markup extension instead, as you do not actually bind any value.)
Usage:
The method in the App class:
I tested this and it works, it is important to use the full class path though,
App.GetEmps
alone would not have worked.