XAML Namespaces

<Canvas x:Name="canvas1" xmlns:w="clr-namespace:Widgets;assembly=ClientBin/Widgets.dll">

  • The XML namespace prefix - you will use the namespace prefix to refer to tha namespace in your XAML page.
  • The .NET namespace - In this case the classes are located in the widgets namespace. If you have classes that you want to use multiple namespace, you can map them to diffrent XML namespace or to the same XML namespace.
  • The assembly - In this case the classes are part of the widgets.dll assembly. You always precode this assembly with the folder name ClientBin. This is the subfolder of your website where visual studio places your compiled silverlight assembly and any class library assemblies that it uses. If you want to use a class that is defined in your silverlight project assembly. The assembly name is base on the name of your project as in SilverlightProject1.dll.
  • X

    Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

    Start Learning Now