默认的命名空间

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     silverlight的核心命名空间

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   xaml语言的命名空间

 

 

xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  设计时相关的命名空间

 

 

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  xml交互性的命名空间,告诉xml语法,哪些需要处理,哪些可以忽略。

 

自定义类库的命名空间:

1.一般的添加方式

 

xmlns:my="clr-namespace:XXX;assembly=XXXX"

2. url的添加方式,可合并多个类库:

    在类库的AssemblyInfo.cs中添加下面属性,

 

using System.Windows.Markup; 

 

 

[assembly: XmlnsDefinitionAttribute("http://www.url.com", "NameSpaceUrl", AssemblyName = "NameSpaceUrl")]

在引有的工程头部

 
xmlns:my="http://www.url.com"

 

 

 

 

 

 

 

 

 

 

 

相关文章:

  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-01-01
猜你喜欢
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-12-02
  • 2021-08-29
相关资源
相似解决方案