1
我定義我的完整視圖模型使用XAML:將xaml文件的內容分配給App.ViewModel屬性?
<local:TestViewModel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:icColors"
SampleProperty="Sample Text Property Value">
<local:TestViewModel.Questions>
....
</local:TestViewModel.Questions>
</local:TestViewModel>
在運行時如何解析這個XAML,並設置爲我的應用程序,App.TestViewModel
的屬性?