I noticed in the beginning of a xaml we have stuff like
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
The only other usage I see for xmlns is importing namespaces from my assemblies. Are these also instances of importing assembly? From a URL? If not, what do they refer to? What if the computer is not connected to the internet?
this is not related to xaml, but to xml in general.
The target of namespaces is to be able to uniquely identify xml objects.
take a look here.
For example, it allows to have two "Customer" node, with different namespaces. Programs can then distinguish if it's a customer node from system A or system B.
This can be compared to C# namespaces also. The "Control" class exists both in System.Windows and System.Windows.Forms and even in System.Web.Ui... same name, but "ownership" are different according the namespaces.
One thing to know, it's only a declaration. the namespace is a freetext, the http:// format is just a convention, and no download of the target uri will occur.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With