WPFwiki, wpf, wiki, .net 3.0, windows presentation foundation, FAQ, free resources, solution, development, microsoft Home of the world's largest WPF FAQ
Edit

Category

XAML

Edit

Question

I often see "x:*" in XAML code (x:Name, x:Key, ...). What exactly does this represent?

Edit

Answer

In XAML, the colon is used to separate a class name from its containing namespace. For instance, the "x:Array" expression represents the Array class contained in the x namespace. As you can guess, the x label is an alias for the real namespace which is defined in the root element of the XAML file. For instance, a WPF Window XAML declaration will look like this:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="WindowsApplication1"
        Height="300"
        Width="300"
    >
...
</Window>


Here, the "http://schemas.microsoft.com/winfx/2006/xaml" string represents the XAML namespace. The classes defined in this namespace are so frequently used that this reference is always included in a XAML file, and by convention the "x" alias is assigned to it.

Edit

Resources

pacquiao vs marquez, pacquiao vs marquez tickets, donaire vs narvaez, philippine travel, travel asia, pacquiao vs marquez, hopkins vs dawson, hopkins vs dawson live streaming, donaire vs narvaez tickets, cotto vs margarito, cotto vs margarito tickets, st-pierre vs diaz, st-pierre vs diaz tickets, fifa world cup, velasquez vs dos santos, velasquez vs dos santos tickets, essay writing help Reverse Cell Phone Lookup Pellet Stoves Outdoor Lighting Outdoor Flood Lights Used Pellet Stoves Discount Pellet Stoves Outdoor Security Lights

All content is Copyright ©2007 Xceed Software Inc. unless otherwise indicated. See the Terms of Service. Contributors must read and agree to the Contribution Policy. WPFwiki is brought to you by Xceed, makers of the powerful yet free Xceed DataGrid for WPF.