I have one assembly XAML registered in AssemblyInfo.cs:
[assembly: XmlnsDefinition("http://schemas.mysite.es/wpf", "SWC.ViewModels")] And In my namespace I hace these classes:
namespace SWC.ViewModels { public class MenuViewModel : ObservableCollection<MenuViewModel> { public MenuViewModel() : base() { } } } If I use the namespace in a user control XAML,
<UserControl x:Class="SWC.UserControls.UserMenu" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:customMenu="http://schemas.mysite.es/wpf"> I can use the class in my XMLNS namespace,
<UserControl.Resources> <customMenu:MenuViewModel x:Key="MenuItemsSource"> But, when I execute the application, the compiler said
The label 'MenuViewModel' dosen't exist in the namespace XML 'http://schemas.mysite.es/wpf' All, can help me?? I'm crazy with this problem!! Best regards,
{}button.