I'm making a Windows 8 program with MVVM that shares the MVM part with Phone.
My problem is that when I try to use the XAML sample data of the Windows Phone project in WinRT I get a bunch of errors. My XAML is:
<vm:MyViewModel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:MyApp.ViewModels"
>
This is obviusly faulty, because uses the clr-namespace directive. But if I change it to
<vm:MyViewModel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:MyApp.ViewModels"
>
I get the same bunch of errors, such as
The name "MyViewModel" does not exist in the namespace "using:MyApp.ViewModels"
Can I use XAML files as sample in WinRT as in Windows Phone? How can I solve this errors?
thanks :)