我有一个带有最新 Caliburn RTW 的 silverlight 3 应用程序。
我在 XAML 中有一个具有以下 caliburn 属性的按钮: PresentationFramework:Message.Attach="ContainerCommand ClassesCommand()"/>
在我的 module.cs 中,我有:
_container.RegisterType(typeof(ClassesCommand), new ContainerControlledLifetimeManager());
_regionManager.RegisterViewWithRegion("MenuRegion", () => _container.Resolve<ClassesButton>());
在 _container.Resolve() 上,我在 XAML 中为“ContainerCommand ClassesCommand()”获得 AG_E_PARSER_BAD_PROPERTY_VALUE。
我的 ClassesCommand.cs 是:
public class ClassesCommand
{
public void Execute()
{
//
}
public bool CanExecute()
{
//
return true;
}
}
京东。