I've seen it a lot and I don't know what it means. I'd say it has something to do with namespaces? I've already googled it but it wasn't clear to me what it's purpose is.
Could anyone explain what it is and in which situations it is usually used?
Thanks
edit:
<Window x:Class="WpfApplication8.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
But for example, in the above code, I am defining x
as an alias for the XAML namespace on the third line, although I am using that same x
right in the first line of code. How does this happen? It doesn't care for the order in which things appear?
edit2: Correct me if I'm wrong:
Window x:Class="WpfApplication8.MainWindow"
The above code will put a class derived from Window in the x:WpfApplication8.MainWindow namespace, while
Window x:Name="abc"
will put in the x namespace an instance of the Window class named abc. Is that right?
If I'm right, had I not used the x
alias, where would have both the class(first case) and instance(second) case have been put in? Nowhere, a bit like anonimous types? They are used but the place where they are is not defined?