5
WPF的新手問題。在子文件夾中實現的窗口不適用於StartUri
我只是在一個項目草案的開始。 我已經定義了一個非常簡單的窗口testWindow1.xaml,它位於解決方案子文件夾Tests中。
在App.xaml中我不能這樣做:
StartupUri="testWindow1.xaml"
(除非我移動testWindow1.xaml回項目的根)
我也試圖定義我的命名空間到應用程序。 XAML標籤,但沒有成功,這也不會工作。
<Application x:Class="MyProject.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:myprojectNS="clr-namespace:MyProject"
StartupUri="myprojectNS.tests.testWindow1.xaml">
在運行時,異常消息抱怨沒有找到的ressource * testWindow1.xaml
完美,沒關係 – 2011-04-17 15:21:26