Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is mapping done for xmlns to the classes in WPF?

Tags:

c#

wpf

xaml

It is said that when xmlns is specified with the uri http://schemas.microsoft.com/winfx/2006/xaml/presentation, it brings in the definition or voaculbalry of classes from presentationframework dll.

I am curious, where is the mapping for the done ? (this question is not of practical significance, i am just curious and trying to understand wpf)

like image 218
paseena Avatar asked Apr 10 '11 22:04

paseena


1 Answers

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

You can see a giant list of these attributes in the Object Browser in the node for 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]
like image 60
SLaks Avatar answered Oct 25 '22 17:10

SLaks