For the life of me, I can't seem to bind to my viewmodel using multibindings. All of the examples on the net bind to gui elements directly, but whenever I try with a viewmodel object exceptions are thrown.
My question is, how do I add a multibinding to several viewmodel objects in xaml?
I need to bind the IsEnabled property of a context menu to two integers in my viewmodel. The following binding doesn't work, since its designed for GUI components. How would I do it to work with my ints?
<MenuItem ItemsSource="{Binding MyMenuItem}">
<MenuItem.IsEnabled>
<MultiBinding>
<Binding ElementName="FirstInt" Path="Value" />
<Binding ElementName="SecondInt" Path="Value" />
</MultiBinding>
</MenuItem.IsEnabled>
</MenuItem>
MyMenuItem is CLR object with the two integers, FirstInt and SecondInt.