将xmlns映射到WPF中的类的位置在哪里?

时间:2011-04-10 22:30:40

标签: c# wpf xaml

据说当使用uri http://schemas.microsoft.com/winfx/2006/xaml/presentation指定xmlns时,它会从presentationframework dll引入类的定义或声纳。

我很好奇,完成的映射在哪里? (这个问题没有实际意义,我只是好奇并试图理解wpf)

1 个答案:

答案 0 :(得分:9)

[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls")]

您可以在PresentationFramework.dll节点的对象浏览器中看到这些属性的巨大列表:

[System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Media.Animation"),
System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Controls.Primitives"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Input"),
System.Windows.Markup.XmlnsPrefixAttribute("http://schemas.microsoft.com/xps/2005/06", "metro"),
System.Windows.Markup.XmlnsCompatibleWithAttribute("http://schemas.microsoft.com/xps/2005/06/resourcedictionary-key", "http://schemas.microsoft.com/winfx/2006/xaml"),
System.Diagnostics.DebuggableAttribute(2),
System.Runtime.InteropServices.ComVisibleAttribute(false),
System.CLSCompliantAttribute(true),
System.Security.AllowPartiallyTrustedCallersAttribute,
System.Security.SecurityRulesAttribute(1409286401),
System.Reflection.AssemblyTitleAttribute("PresentationFramework.dll"),
System.Reflection.AssemblyDescriptionAttribute("PresentationFramework.dll"),
System.Reflection.AssemblyDefaultAliasAttribute("PresentationFramework.dll"),
System.Reflection.AssemblyCompanyAttribute("Microsoft Corporation"),
System.Reflection.AssemblyProductAttribute("Microsoft® .NET Framework"),
System.Reflection.AssemblyCopyrightAttribute("© Microsoft Corporation.  All rights reserved."),
System.Reflection.AssemblyFileVersionAttribute("4.0.30319.1"),
System.Reflection.AssemblyInformationalVersionAttribute("4.0.30319.1"),
System.Resources.SatelliteContractVersionAttribute("4.0.0.0"),
System.Resources.NeutralResourcesLanguageAttribute("en-US"),
System.Reflection.AssemblyDelaySignAttribute(true),
System.Reflection.AssemblyKeyFileAttribute("f:\dd\wpf\src\windows.snk"),
System.Runtime.CompilerServices.RuntimeCompatibilityAttribute,
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06/documentstructure", "System.Windows.Documents.DocumentStructures"),
System.Runtime.CompilerServices.InternalsVisibleToAttribute("PresentationFramework.Royale, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9"),
System.Runtime.CompilerServices.InternalsVisibleToAttribute("PresentationFramework.Luna, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9"),
System.Runtime.CompilerServices.InternalsVisibleToAttribute("PresentationFramework.Aero, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9"),
System.Runtime.CompilerServices.InternalsVisibleToAttribute("PresentationFramework.Classic, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9"),
System.Runtime.CompilerServices.InternalsVisibleToAttribute("System.Windows.Presentation, PublicKey=00000000000000000400000000000000"),
System.Runtime.CompilerServices.DependencyAttribute("mscorlib,", 1),
System.Runtime.CompilerServices.DependencyAttribute("System,", 1),
System.Runtime.CompilerServices.DependencyAttribute("WindowsBase,", 1),
System.Runtime.CompilerServices.DependencyAttribute("PresentationCore,", 1),
System.Runtime.CompilerServices.DependencyAttribute("System.Xaml,", 2),
System.Runtime.CompilerServices.DependencyAttribute("System.Core,", 2),
System.Windows.ThemeInfoAttribute(2, 0),
System.Security.SecurityCriticalAttribute,
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Documents"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Shapes"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Shell"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Navigation"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Data"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls.Primitives"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Animation"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media"),
System.Windows.Markup.XmlnsPrefixAttribute("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "av"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Controls"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Documents"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Shapes"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Shell"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Navigation"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Data"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Controls.Primitives"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media.Animation"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Input"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "System.Windows.Media"),
System.Windows.Markup.XmlnsPrefixAttribute("http://schemas.microsoft.com/netfx/2007/xaml/presentation", "wpf"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Controls"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Documents"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Shapes"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Shell"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Navigation"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Data"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Controls.Primitives"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Media.Animation"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "System.Windows.Input"),
System.Windows.Markup.XmlnsPrefixAttribute("http://schemas.microsoft.com/netfx/2009/xaml/presentation", "wpf"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/winfx/2006/xaml", "System.Windows.Markup"),
System.Windows.Markup.XmlnsPrefixAttribute("http://schemas.microsoft.com/winfx/2006/xaml", "x"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Controls"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Documents"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Shapes"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Navigation"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows.Data"),
System.Windows.Markup.XmlnsDefinitionAttribute("http://schemas.microsoft.com/xps/2005/06", "System.Windows"),
System.Runtime.AssemblyTargetedPatchBandAttribute("1.0.21-0"),
System.Runtime.CompilerServices.ReferenceAssemblyAttribute]