Hi folks,
Software: CSLA 4.1 – Bxf – VS2010
I'm trying to bind my ModelView (CustomerVM.cs) to my View (CustomerView.xaml) without using DesignSource.
In the Navigation class (MainMenuViewModel.cs) the view is called by using Bxf :
public void LoadLoginPage()
Shell.Instance.ShowView(typeof(CustomerView).AssemblyQualifiedName, "customerViewModelViewSource", new ViewModels.CustomerVM(), "MainContent");}
}
My problem is that i dont know the right xaml syntax to make the binding in the View.
I think, it should look to something like that but it doesnt work.
<mv:MainMenuViewModel x:Key="MenuViewModel"/>
...
<CollectionViewSource x:Key="customerViewModelViewSource" Source="{StaticResource MenuViewModel}" />
Thanks in advance for your help,
Best regards,
Cédric
I am guessing you have a property on your MenuViewModel that contains a list of menu items? If so, you need something like:
<CollectionViewSource x:Key="customerViewModelViewSource" Source="{StaticResource MenuViewModel, Path=MenuItemsProp}" />
thx a lot.
Copyright (c) Marimer LLC