i did this:
this.combobox.ItemsSource = Common.Component.ModuleManager.Instance.Modules;
to bind the combobox to a collection, which is located in an other project/namespace. But i had to move the ComboBox into a DataTemplate.
Now i need to do something like that:
<ComboBox ItemsSource="{Binding Common.Component.ModuleManager.Instance.Modules}"/>
I don’t want to list all of my tries, but none were successful.
Any better Ideas?
You need to map the .NET namespace to an XML namespace at the top of your XAML file:
So now “q” is mapped to the “Common.Component” namespace. Now you can use the x:Static markup extension to access the static “Instance” property of your ModuleManager class:
See if that works for you.
Edit
One more thing: If your “Common.Component” namespace lives in a separate assembly, you need to tell the XAML that: