WPF xmlns

xmlns=xml namespace 导入命名空间,相当于C#中的using
xmlns有几种不同的形式

xmlns为url网址

一般是大公司,url固定

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

xmlns为命名空间的引用

(1)在同一程序集

xmlns:local="clr-namespace:WpfDemo.DataContextAndItemSource"

(2)不在同一程序集
需要表明是哪个程序集(assembly)

xmlns:sys="clr-namespace:System;assembly=mscorlib"

xmlns为第三方控件,根据文档来

 
原文地址:https://www.cnblogs.com/Lulus/p/8150943.html