http://schemas.microsoft.com/winfx/2006/xaml/presentation definition

后端 未结 2 1119
北海茫月
北海茫月 2020-12-31 18:55

When you create a new WpfApplication project in Visual Studio you get the following XAML. Copying and pasting the URL http://schemas.microsoft.com/winfx/2006/xaml/presentati

2条回答
  •  悲哀的现实
    2020-12-31 19:52

    A namespace is a URI (a URN or a URL), but a URI is not always a URL. The URI used for namespaces is meant to uniquely identify names to prevent clashed. The XML Namespaces Working Group at the time decided to use a technique already know to uniquely identify things: URIs.

    As a result, many people think it should actually point to something real. Occasionally that is true, but more often it is not, and it is not meant to be. It is an identitifier, not a location.

    In the case of schemas, it is can be used to denote the target namespace, which is the namespace that must be used in documents that need to validated against the schema. To obtain the schema, you will have to ask the vendor. In this case, the schema can be found at a location similar or equal to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas, look for wpfe.xsd (however, to confuse matters more, Microsoft has decided to create an alias for the target namespace, which is why you will not see the same namespace you mentioned).

提交回复
热议问题