locked
How does namespace mapping work in windows store projects

    Question

  • I am the author of an Add-In for Visual Studio which provides support for the localization of applications. This question is not about writing Windows Store Apps, but about accessing the project structure from a Visual Studio Add-In.

    I am struggling to understand the link between the standard namespace definitions

    • http://schemas.microsoft.com/winfx/2006/xaml/presentation
    • http://schemas.microsoft.com/winfx/2006/xaml
    • http://schemas.microsoft.com/expression/blend/2008
    • http://schemas.openxmlformats.org/markup-compatibility/2006

    and the libraries which implement functions or at least contain the relevant metadata.

    With WPF and Silverlight, I could open the referenced assemblies and look for the XmlnsDefinition, which provides a link between the URI referenced in XAML and the CLR namespaces in the library.

    I understand that the XmlnsDefinition is no longer used in Windows Store Apps and that application programmers should use the "using" syntax to refer to their namespaces in XAML.

    What I need to understand, is how the mapping works for the built-in namespaces listed above. Is there a hard coded list of namespaces associated with each URI. (That is very hard to imagine, because it would be extremely inflexible.)

    Thanks in advance
    Phil

    Sunday, May 04, 2014 8:02 AM

All replies

  • Hi,

    You can refer to the links below to get more information:

    http://msdn.microsoft.com/en-us/windows/apps/jj150588

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 05, 2014 4:05 AM
  • That is a very interesting page, which kind of confirms my fears. With regard to the namespace "http://schemas.microsoft.com/winfx/2006/xaml/presentation" it states:

    This is the same XAML namespace identifier used in several predecessor Microsoft technologies that also use XAML as a UI definition markup format.

    The old mechanism with XmlnsDefinition has been broken. It has been replaced by some unknown mechanism which appears to be undocumented and might be a hard coded list. It sounds like the CLR namespaces are defined only by backward compatibility.

    It says something similar about "http://schemas.microsoft.com/winfx/2006/xaml".

    It looks like I will have to use hard coded logic to find the type information, but I am not happy about it.

    Phil

    Monday, May 05, 2014 8:07 PM
  • Hi,

    Thanks for your feedback. Microsoft engineer already concern with the problem and try to fix it. You can refer to the link:

    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/eb0d6a76-27a3-4a85-8108-6af9200375fa/where-to-find-assembly-xmlnsdefinition-?forum=winappswithcsharp

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, May 06, 2014 6:49 AM