WPF - Namespaces
-
Hopefully this will be an easy one for someone to answer!! I have a class (CollectionsViewModel) with a static properity in (they dont have to be static), which return a List. I want to call the propertiy in xmal to set my itemsource of a combo. Here is what i have
ItemsSource="{Binding Source={x:Static collections:CollectionsViewModel}, Path=GetQueueCollection}"
where collections is defined as the namespace of CollectionsViewModel class I can't set the CollectionsViewModel to the datacontext, as that is set to another class Any help/links most welcome Mark
-
Hopefully this will be an easy one for someone to answer!! I have a class (CollectionsViewModel) with a static properity in (they dont have to be static), which return a List. I want to call the propertiy in xmal to set my itemsource of a combo. Here is what i have
ItemsSource="{Binding Source={x:Static collections:CollectionsViewModel}, Path=GetQueueCollection}"
where collections is defined as the namespace of CollectionsViewModel class I can't set the CollectionsViewModel to the datacontext, as that is set to another class Any help/links most welcome Mark
-
Hopefully this will be an easy one for someone to answer!! I have a class (CollectionsViewModel) with a static properity in (they dont have to be static), which return a List. I want to call the propertiy in xmal to set my itemsource of a combo. Here is what i have
ItemsSource="{Binding Source={x:Static collections:CollectionsViewModel}, Path=GetQueueCollection}"
where collections is defined as the namespace of CollectionsViewModel class I can't set the CollectionsViewModel to the datacontext, as that is set to another class Any help/links most welcome Mark
It is simple only Check this article Displaying Multiple Property Values In WPF Combo by using DataTemplate, Style & Triggers[^] -Niladri Biswas :)
Niladri Biswas