1
我想嘗試創建一個Caliburn.Micro框架的WPF應用程序,但我有一個問題。我在Silverlight中看到很多用於教程的源代碼,但在WPF上看起來不太好。我擁有Silverlight教程中的所有內容,所有內容都經過編譯而不是渲染。WPF和Caliburn C#編譯後沒有渲染窗口
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CaliburnTest"
x:Class="CaliburnTest.App">
<Application.Resources>
<local:AppBootstrapper x:Key="Bootstrapper" />
</Application.Resources>
</Application>
引導程序
namespace CaliburnTest
{
class AppBootstrapper : Bootstrapper<AppViewModel> {}
}
APPVIEW
<Window x:Class="CaliburnTest.Views.AppView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AppView" Height="350" Width="525">
<Grid>
</Grid>
</Window>
namespace CaliburnTest.Views
{
public partial class AppView
{
public AppView()
{
InitializeComponent();
}
}
}
AppModelView
using Caliburn.Micro;
namespace CaliburnTest.ViewModels
{
class AppViewModel : PropertyChangedBase
{
}
}
感謝答覆。
權利內容如果你看一下我的問題有等被定義Application.Resources <地方:AppBootstrapper X:鍵=「引導程序」 />但此標記的新內容在我的答案中分爲ResourceDictionary和其他設置 – pesoklp13 2013-02-19 13:59:52