Now I am moving my application from .NET 3.5 to .NET 4.0, and I get the following error message: "Unable to put the page in style." I applied the MVVM template for this application and used data templates to tell the application how to display my various view models ... for example below.
<DataTemplate DataType="{x:Type vm:ConfigureAxViewModel}"> <vw:ConfigureAxPage /> </DataTemplate>
Is there any way around this error? Should I manage my pages?
Thanks Roy
Documents for 3.5 and 4.0:
Window, NavigationWindow, Frame .
, , - UserControls. ...
UserControls
Visual Studio 2010. , , App.xaml
App.xaml
<DataTemplate DataType="{x:Type vm:LoginViewModel}"> <views:Login /> </DataTemplate>
(, "", ?) , , Login - . , . DataContext xaml:
DataContext="{Binding LoginPage,Source={StaticResource Locator}}
MVVM Light, Locator.