Question : Confusion about XAML namespace values.

I have read that xml namespace value is any arbitrary string value.

But in the next paragraph in the book, I have read that : This namespace (xmlns:x) contains the required language components that are defined in the xaml specification, such as the ability to set an objects's name.

Please anyone clear me this line.

Because this string does not map to any namespace or assembly or anything in .net framework, then how can this namespace contain the language components or types such as Name in x:Name ?
1:
2:
3:
4:
5:
6:
7:
8:
9:
<UserControl x:class="Chapter03.Page" 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  width="400" height="300">

            <Grid x:Name="LayoutRoot" Backgroud="White">
            </Grid>

</UserControl>

Answer : Confusion about XAML namespace values.

http://schemas.microsoft.com/winfx/2006/xaml/presentation
uses a concept  called
Mapping CLR Namespaces to XML Namespaces in an Assembly

What this by adding http:// you can refer more than one assembly in as single namespace variable.

e.g. x:Name,x:Type here x may be referring more than one assembly or to hide which assembly it points.


By any arbitrary string value means there is no format for naming the namespace it can be any string.

Random Solutions  
 
programming4us programming4us