码迷,mamicode.com
首页 > Windows程序 > 详细

WPF之命名空间

时间:2016-12-01 11:35:12      阅读:299      评论:0      收藏:0      [点我收藏+]

标签:span   默认   空间   定义类   strong   框架   lib   命名   ati   

1.参考:

https://msdn.microsoft.com/zh-cn/library/ms747086(v=vs.110).aspx

 

创建一个WPF应用,默认生成代码:

1 <Window x:Class="WpfApplication1.MainWindow"
2         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4         Title="MainWindow" Height="350" Width="525">
5     <Grid>
6         
7     </Grid>
8 </Window>

 

2.第一个声明将整个 WPF 客户端/框架 XAML 命名空间映射为默认命名空间:

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

第二个声明映射一个单独的 XAML 命名空间,通常将其映射到 x: 前缀:

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

3.映射到自定义类和程序集

可以使用xmlns前缀声明中的一系列令牌将XML命名空间映射到程序集,这与将标准WPF和XAML内部

 

WPF之命名空间

标签:span   默认   空间   定义类   strong   框架   lib   命名   ati   

原文地址:http://www.cnblogs.com/imstrive/p/6121118.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!