蝈蝈俊.net

-- 用随笔来记录自己的技术感触
随笔 - 655, 评论 - 4839, 引用 - 276

导航

关于

这里是我的技术Blog,下一代CSDN社区Blog在 http://blog.csdn.net/ghj1976/

标签

每月存档

最新留言

  • re:WPF/Silverlight 控件的几幅继承关系图
    <p class="MsoNormal" style="text-align: center; line-height: 20pt; margin: 0cm 0cm...
    by oaoffices(注册) on 2010/2/7 18:38:37
  • tWTqXHvjmOmv
    XZ5W2T &lt;a href=&quot;http://zecclkdejwou.com/&quot;&gt;zecclkdejwou&lt;/a&am...
    by uwwkhptujtw(匿名) on 2010/2/7 11:26:16
  • Re
    Many times we wanted to order significant example thesis close to this topic in the &lt;a href=&...
    by Ellieru(匿名) on 2010/2/6 10:25:37
  • Rrwvthsw
    Very Good Site &lt;a href=&quot; http://www.newsland.it/nr/article/it-alt.faq/4163.html &...
    by Rrwvthsw(匿名) on 2010/2/6 5:51:43
  • Edozadcx
    Good crew it's cool :) &lt;a href=&quot; http://www.newsland.it/nr/article/it-alt.faq/4163.h...
    by Edozadcx(匿名) on 2010/2/6 3:56:25
  • Ptryjfhi
    i'm fine good work &lt;a href=&quot; http://www.newsland.it/nr/article/it-alt.faq/4143.html ...
    by Ptryjfhi(匿名) on 2010/2/6 2:52:34
  • samuel
    5l05ro http://www.cRk2bdPqQls602mIa4bgo.com
    by samuel(匿名) on 2010/2/5 4:00:27
  • samuel
    5l05ro http://www.cRk2bdPqQls602mIa4bgo.com
    by samuel(匿名) on 2010/2/5 4:00:25
  • qCSFwFqaMVQizlCas
    2dnR2u &lt;a href=&quot;http://geunkaxpmhqt.com/&quot;&gt;geunkaxpmhqt&lt;/a&am...
    by spahxbypafn(匿名) on 2010/2/5 1:47:48
  • Re
    Very oft the &lt;a href=&quot;http://quality-papers.com/topics/comparison_essay&quot;&am...
    by Gwen18uV(匿名) on 2010/2/4 16:16:33
  • samuel
    SnU3S6 http://www.cRk2bdPqQls602mIa4bgo.com
    by samuel(匿名) on 2010/2/4 15:37:58
  • Koxtggnh
    It's serious &lt;a href=&quot; http://www.newsland.it/nr/article/it-alt.faq/3298.html &q...
    by Koxtggnh(匿名) on 2010/2/4 6:09:20
  • SrehssllMZjp
    XefKdm &lt;a href=&quot;http://onztwqzldpty.com/&quot;&gt;onztwqzldpty&lt;/a&am...
    by fsfirjqclpn(匿名) on 2010/2/4 0:43:23
  • OLDLqAKsuD
    BnPVvu &lt;a href=&quot;http://jzyknfzplvon.com/&quot;&gt;jzyknfzplvon&lt;/a&am...
    by ofudghioo(匿名) on 2010/2/4 0:07:18
  • Hwbjmqub
    Punk not dead &lt;a href=&quot; http://www.newsland.it/nr/article/it-alt.faq/3238.html &...
    by Hwbjmqub(匿名) on 2010/2/3 14:14:20
  • Re
    From time to time different students have assignments to compose the &lt;a href=&quot;http:/...
    by Rebeccamp28(匿名) on 2010/2/3 11:04:43
  • emRTIwMZOMDFfCg
    nQf5M6 &lt;a href=&quot;http://eaykuvqnrful.com/&quot;&gt;eaykuvqnrful&lt;/a&am...
    by pnxjuwq(匿名) on 2010/2/2 23:36:36
  • jPRCuLgHySwb
    qc0qb5 &lt;a href=&quot;http://ciktzfijfsfj.com/&quot;&gt;ciktzfijfsfj&lt;/a&am...
    by yuplvewx(匿名) on 2010/2/2 19:05:07
  • re:IP to Integer
    IPV6呢?
    by howie(匿名) on 2010/2/2 10:34:10
  • IcqpxCPAVoKn
    Ff4AZo &lt;a href=&quot;http://bovwngagtlua.com/&quot;&gt;bovwngagtlua&lt;/a&am...
    by mbnbusiuh(匿名) on 2010/2/1 18:40:41
  • tJZDsNznVk
    scXyAq &lt;a href=&quot;http://pqtnkiwdacoa.com/&quot;&gt;pqtnkiwdacoa&lt;/a&am...
    by lwummgsncve(匿名) on 2010/2/1 3:53:51
  • Okurlpzt
    i'm fine good work &lt;a href=&quot; http://littlelolitasmodels.vox.com/ &quot;&gt;p...
    by Okurlpzt(匿名) on 2010/1/31 19:30:08
  • Sgoonhvn
    Excellent work, Nice Design &lt;a href=&quot; http://littlelolitasmodels.vox.com/ &quot;...
    by Sgoonhvn(匿名) on 2010/1/31 18:29:47
  • Zloozuuj
    Punk not dead &lt;a href=&quot; http://lolitatoplist.vox.com/ &quot;&gt;lolita mpeg...
    by Zloozuuj(匿名) on 2010/1/31 17:52:04
  • Jmqskdlf
    I love this site &lt;a href=&quot; http://younglolitasbbs.vox.com/ &quot;&gt;preetee...
    by Jmqskdlf(匿名) on 2010/1/31 15:09:12
  • Tmmhaxbr
    Wonderfull great site &lt;a href=&quot; http://lolitabbs969.vox.com &quot;&gt;lolita...
    by Tmmhaxbr(匿名) on 2010/1/31 14:31:36
  • Asnejtjx
    real beauty page &lt;a href=&quot; http://underagelolitas.vox.com/ &quot;&gt;top 50 ...
    by Asnejtjx(匿名) on 2010/1/31 12:51:18
  • Tibtihsu
    &lt;a href=&quot; http://lolitamodels.vox.com/ &quot;&gt;real young lolitas&lt;...
    by Tibtihsu(匿名) on 2010/1/31 7:50:15
  • Jlcdzoem
    Very Good Site &lt;a href=&quot; http://lolitamodels.vox.com/ &quot;&gt;kds pedo lol...
    by Jlcdzoem(匿名) on 2010/1/31 6:47:06
  • Eqczveev
    i'm fine good work &lt;a href=&quot; http://mipagina.univision.com/preteenlolitabbs/ &qu...
    by Eqczveev(匿名) on 2010/1/31 6:08:16
  • Ndhvewjd
    Very interesting tale &lt;a href=&quot; http://mipagina.univision.com/preteenlolitabbs/ &...
    by Ndhvewjd(匿名) on 2010/1/31 5:06:34
  • Jktojpnv
    &lt;a href=&quot; http://mipagina.univision.com/preteenlolitamodels/ &quot;&gt;goth...
    by Jktojpnv(匿名) on 2010/1/31 3:27:26
  • Lftiemmn
    Very interesting tale &lt;a href=&quot; http://mipagina.univision.com/preteenyounglolitas/ &...
    by Lftiemmn(匿名) on 2010/1/31 2:51:02
  • ITYAtUVjqijsAcZ
    4SnRK4 &lt;a href=&quot;http://lbmuqlnscvjk.com/&quot;&gt;lbmuqlnscvjk&lt;/a&am...
    by pqoqxfvrbcb(匿名) on 2010/1/30 19:25:06
  • bjhbHxudMahxGCkiue
    3mRPzg &lt;a href=&quot;http://rzitclgaemis.com/&quot;&gt;rzitclgaemis&lt;/a&am...
    by quglkot(匿名) on 2010/1/30 19:20:51

广告

 

我们在每一个XAML文件中都可以看到下面的信息:

Silverlight应用
<
UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > </UserControl>
WPF应用
<
Window x:Class="WpfApplication1.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>

      XAML文件首先是一个XML文件。为了验证自己和子元素的合法性,即保证在XML文档中的元素和属性名字的合法性,XML规范了XML命名空间,参看下面文档:

http://www.opendl.com/openxml/w3/TR/xml-names/xml-names-gb.html

      上面例子中,xmlns 属性专门指默认的 xmlns 命名空间。在默认的 xmlns 命名空间中,可以不使用前缀指定标记中的对象元素。目前对于大多数的 WPF 应用程序以及 SDK 的 WPF 部分中给出的几乎所有示例版本的WPF,Silverlight 2.0 (含)以后的开发工具, 默认的 xmlns 命名空间均映射到 WPF 命名空间 http://schemas.microsoft.com/winfx/2006/xaml/presentation

      xmlns:x 属性指示另外一个 xmlns 命名空间,该命名空间映射 XAML 语言命名空间 http://schemas.microsoft.com/winfx/2006/xaml 。在具有此映射的文件的标记中引用时,XAML 规范定义的所需语言组件带有 x: 前缀。

如下图所示:

<Page 根元素的开始对象元素
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 默认 (WPF) 命名空间
就类似于如下的C#代码:
using System.Windows;
using System.Windows.Automation 
using System.Windows.Controls;
using System.Windows.Controls.Primitives 
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms.Integration 
using System.Windows.Ink 
using System.Windows.Media.Animation 
using System.Windows.Media.Effects 
using System.Windows.Media.Media3D 
using System.Windows.Media.TextFormatting 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 这是XAML语言命名空间,用于映射System.Windows.Markup命名空间中的类型,而且它也定义了XAML编译器或解析器中的一些特殊的指令。这些指令通常是作为XML元素的特性出现的,因此它们看上去像宿主元素的属性,但实际上并不是如此。
x:Class="MyNamespace.MyPageCode" 分部类声明,它将标记连接到此分部类中定义的任何代码隐藏
> 根的对象元素的末尾,但由于页面包含子元素,因此尚未结束

 

参考资料:

WPF学习笔记1:XAML之NameSpace
http://www.cnblogs.com/jacksonyin/archive/2008/02/25/1080336.html

HTML xmlns 属性
http://www.w3school.com.cn/tags/tag_prop_xmlns.asp

XAML 概述
http://msdn.microsoft.com/zh-cn/library/ms752059.aspx

《WPF揭秘》 2.3  命名空间
http://book.csdn.net/bookfiles/677/10067721293.shtml

打印 | 张贴于 2009-11-23 14:06:35 | Tag:.net 编程心得  技术随笔  网站开发管理相关内容  .net 3.5  读书笔记  .net 3.0  WPF 相关  .Net 4.0  VS2010

留言反馈

#re:WPF,Silverlight 中的 xmlns,xmlns:x 编辑
2009-11-28 14:30:00 | skydau

发表留言

标题
姓名
邮件
主页
留言 

Powered by: Joycode.MVC引擎 0.5.2.0