Hi I试图使用Caliburn微粒的温斯尔堡。 直到现在,我只使用最低生活标准。
页: 1
我在我的项目中添加了这一呼吁,并修改了Appxaml档案:
<Application x:Class="Chroma_Configer.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Bootstraper="clr-namespace:Chroma_Configer.Bootstraper">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<Bootstraper:CastleBootstrapper x:Key="bootstrapper" />
<Style x:Key="MainView_FontBaseStyle" TargetType="{x:Type Control}">
<Setter Property="FontFamily" Value="Arial"/>
</Style>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
我制造壳牌书和壳牌文View:
public interface IShellViewModel
{
}
public class ShellViewModel : Conductor<IScreen>.Collection.OneActive,
IShellViewModel
{
}
当我出行时,我有这个错误:
{"No component for supporting the service Chroma_Configer.ViewModels.IShellViewModel was found"}
我开始在麦加堡,我知道他做的是:
var container = new WindsorContainer();
container.AddComponent("JsonUtil", typeof(IShellViewModel), typeof(ShellViewModel));
var shell = container.Resolve<IShellViewModel>();
In MEF 用户称号:[Export]和[Import].。 谁能领导我处理这个问题?
Another question is that I have some tool class:
public interface ITooll{}
public class Tool:ITool{}
我愿在壳牌照的“Model”类中进口。
How can I do it with with CastleBoostraper?