开发者

Caliburn bad parser error for container registered command

I have a silverlight 3 application with the latest Caliburn RTW.

I have a button with the following caliburn property in XAML: PresentationFramework:Message.Attach="ContainerCommand ClassesCommand()"/>

In my module.cs I have :

        _container.Re开发者_运维问答gisterType(typeof(ClassesCommand), new ContainerControlledLifetimeManager());


        _regionManager.RegisterViewWithRegion("MenuRegion", () => _container.Resolve<ClassesButton>());

On the _container.Resolve() I get AG_E_PARSER_BAD_PROPERTY_VALUE for "ContainerCommand ClassesCommand()" in the XAML.

My ClassesCommand.cs is :

public class ClassesCommand
{

    public void Execute()
    {
        //
    }

    public bool CanExecute()
    {
        //
        return true;
    }

}

JD.


Try registering your command by Key instead of type. Also, try removing the empty parenthesis from the end. Let me know if either of these things fixes your issue. Thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜