Error Assign Command Property on MVVM App

Nov 29, 2010 at 2:45 PM
Edited Nov 29, 2010 at 2:50 PM

Hi

I found a exception when I try to use the Command Property on the control

 

  This is my XAML Code: 

 

<UserControl x:Class="AlfaTPO.UCtrlExplorador"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Menu="http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation"
    xmlns:my2="clr-namespace:AlfaTPO"
    xmlns:my="clr-namespace:SL4PopupMenu;assembly=SL4PopupMenu"
           
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.DataContext>
        <my2:VMCtrlExplorador/>
    </UserControl.DataContext>
    <Grid x:Name="LayoutRoot">
        <StackPanel Orientation="Horizontal">
            <Button Name="Busquedas"/>
            <my:PopupMenu Name="Menu"
                          RightClickElements="Busquedas" 
                          LeftClickElements="Busquedas">
                <ListBox >
                    <my:PopupMenuItem Header="Busquedas" Command="TBusqueda"/>

                    <my:PopupMenuSeparator />
                    <my:PopupMenuItem Header="Personalizadas" 
                                      ImageSourceForRightMargin="images/FindRecipient.png">

 Error al crear 'System.Windows.Input.ICommand' a partir del texto 'TBusqueda'. [Line: 24 Position: 66]    en System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   en AlfaTPO.UCtrlExplorador.InitializeComponent()
   en AlfaTPO.UCtrlExplorador..ctor()



Coordinator
Nov 30, 2010 at 7:06 PM

Can I also see your implementation of the command TBusqueda?

Dec 1, 2010 at 6:36 AM

Sorry, deployed the "very last" version ¿¿¿???  problem has solved, thank you any way