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

14,949

Solution 1

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.

Solution 2

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

Solution 3

I am not sure this question has been answered yet, but I was able to find it on my local machine for Visual Studio 2013, Ultimate edition. You can find all the types (such as DataContextProperty or what I was looking for, DesignInstanceExtension) in an assembly somewhere on your machine with a path that looks like:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\Microsoft.Expression.Platform.dll

Please note that this may vary depending on the version of Visual Studio you are using. I am just reporting what "works on my machine." Doing a machine-wide search for "Microsoft.Expression.Platform.dll" should do the trick.

Share:
14,949

Related videos on Youtube

Tealc Wu
Author by

Tealc Wu

Updated on October 09, 2022

Comments

  • Tealc Wu
    Tealc Wu over 1 year

    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>
    
  • Jack Ukleja
    Jack Ukleja over 7 years
    Good find @Mike-EEE but I'm unable to find anything similar on my VS2017 RC installation. I'm even attaching to VS to see what modules are loaded, and I've had a browse through them and can't find the DesignInstanceExtension :-/
  • Mike-E
    Mike-E over 7 years
    Yikes @Schneider I haven't dared venture out that far ahead in RC software. Do you have ReSharper Ultimate, by chance? You might be able to do a symbol look up from all loaded assemblies in memory if you have attached to a running VS process. Make sure the Xaml design time and designer has loaded as well. That is, you can see a Xaml designer screen and everything. Perhaps these components have moved into a new assembly altogether?
  • Jack Ukleja
    Jack Ukleja over 7 years
    Yup I've debugged the XDesProc process and had a look through some of the assemblies, but couldn't find the d:DesignContext (which I presume is a Xaml Markup Extension)
  • Mike-E
    Mike-E over 7 years
    Bummer. How about loading the XDesProc.exe in Reflector/dotPeek and taking a look through its references? Another brute-force way is to do the same with *.dll on your machine, LOL. Then do a class search. Might take a while, but you should find it. TBH I forgot how I landed on the DLL above. :( Sounds like they have renamed the assemblies.
  • Krimson
    Krimson almost 5 years
    For VS2017 Enterprise I found that the WpfFrameworkElementDesignTimeProperties class is located in: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\Microso‌​ft.VisualStudio.Desi‌​gnTools.WpfDesigner.‌​dll" and that the DesignInstanceExtension markup-extension is located in: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies\Microso‌​ft.VisualStudio.Desi‌​gnTools.Designer.dll‌​"
  • Joe Huang
    Joe Huang almost 3 years
    Docs link dead.