第一部分

以下说明三个最基础的概念。

一.被引导的Windows窗体Shell

wpf程序在启动时,需要一个宿主容器,一般情况下是System.Windows.Window,以下是一个刚创建的窗体。

<Window x:Class="HelloWorldSample.Window1"    
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
  Title="Window1" Height="300" Width="300">
    <Grid>           
 </Grid>
</Window> 
默认情况下设置起始页
<Application x:Class="HelloWorldSample.App"
   
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   
StartupUri="Window1.xaml">
</
Application>
随着prism框架的加入,运行主窗体的方式改变了,我们要去掉StartupUri,手动启动窗体。
prism通过一个名为Bootstrapper类作为引导程序,它不再仅仅是一个单纯的窗体了,这个窗体我们也可以称为Shell。

二.被附加的内容区域Region

三.被拆分的模块Module

posted on 2010-12-20 09:52  hl3292  阅读(311)  评论(0编辑  收藏  举报