Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find XAML namespace d="http://schemas.microsoft.com/expression/blend/2008" mapping library?

In every default WPF window as below, there are four namespaces referenced. I know:

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

and

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

are mapping library PresentationCore.dll and PresentationFramework.dll. But where can I find the library files mapping namespace

xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

and

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

?

<Window x:Class="WpfApplication1.MainWindow"
    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"
    Title="MainWindow" Height="350" Width="525">
    <Grid>

    </Grid>
</Window>
like image 788
Tealc Wu Avatar asked Sep 10 '12 08:09

Tealc Wu


People also ask

What is XAML namespace?

A XAML namespace is really an extension of the concept of an XML namespace. The techniques of specifying a XAML namespace rely on the XML namespace syntax, the convention of using URIs as namespace identifiers, using prefixes to provide a means to reference multiple namespaces from the same markup source, and so on.

What is CLR namespaces?

clr-namespace: The CLR namespace declared within the assembly that contains the public types to expose as elements. assembly= The assembly that contains some or all of the referenced CLR namespace. This value is typically just the name of the assembly, not the path, and does not include the extension (such as .

What is xmlns in WPF?

xmlns is an XML, not necessarily XAML, construct which defines a namespace in which to resolve xml element names. Because it is defined without a qualifier, it is defining the default namespace by which an XML element name should be resolved. In XAML you usually see the following entry.


2 Answers

Almost correct. Please see more details in MSDN: http://msdn.microsoft.com/en-us/library/cc189061(v=vs.95).aspx

d: (http://schemas.microsoft.com/expression/blend/2008)

The d: XAML namespace is intended for designer support, specifically designer support in the XAML design surfaces of Microsoft Visual Studio and Microsoft Expression Blend. The d: XAML namespace enables designer attributes on XAML elements. These designer attributes only affect the design aspects of how XAML behaves. The designer attributes are ignored when the same XAML is loaded by the XAML parser in the Silverlight run-time, and the application runs. Generally, the designer attributes are valid on any XAML element, but in practice there are only certain scenarios where applying a designer attribute yourself is appropriate.

mc: (http://schemas.openxmlformats.org/markup-compatibility/2006)

mc: Indicates and supports a markup compatibility mode for reading XAML. Typically, the d: prefix is associated with the attribute mc:Ignorable. This technique enables run time XAML parsers to ignore the design attributes, as described previously.

like image 85
Tealc Wu Avatar answered Oct 20 '22 12:10

Tealc Wu


From my understanding, “d”namespace enables designer-only attributes in your code. This is so you can add stuff like design time data to your application and make it blendable.

The “mc” namespace supports compatibility and usually the “d”prefix mentioned above is paired with an “mc:ignorable” which tells the compiler to ignore the design time elements at runtime

like image 30
lookitskris Avatar answered Oct 20 '22 12:10

lookitskris