Why are there two formats to the WpfToolkit namespace? When should I use each? RRS feed

  • Question

  • Hi, when restyling the Wpf Toolkit Datagrid I discovered that Expreesion Blend uses a Wpf Toolkit namespace in the [first] format:


     I've always used the namespace [second format]:


    They are different since substituting the second format into the Expression Blend restyling resulted in unknown tags, among other things.

    Why are there two namespace formats? Is there a penalty for using the first format? Should I ever use the second format?

    Thnaks, Graeme

    Monday, February 28, 2011 12:22 AM


  • Well, they are slightly different.

    The frst example you provided allows for a namespace declaration to map to multiple CLR namespaces.  For example, System.Windows and System.Windows.Controls maps to the http://schemas.microsoft.com/winfx/2006/xaml/presentation namespace, allowing you to reference any controls from either mapped CLR namespace from a single declaration.

    The second example is a fully qualified namespace declaration.  It only maps to a single CLR namespace and you will only have access to controls in that single CLR namespace.

    For more information on namespaces please visit this link: http://msdn.microsoft.com/en-us/library/ms747086.aspx

    • Marked as answer by GRichardson Monday, February 28, 2011 5:53 AM
    Monday, February 28, 2011 4:37 AM