Kevin McNeish Blog

All things iOS, Kindle and .NET

Recent Posts

Tags

News

  • First books in my new book series, "iOS App Development for Non-Programmers" are now available! iBookStore: http://itunes.apple.com/us/book/book-1-diving-in-ios-app-development/id558788074?mt=11 Amazon: http://www.amazon.com/dp/B0097N8XBE Amazon: http://www.amazon.com/dp/B0099RQGMQ

Community

Email Notifications

Archives

Silverlight: Fixing the "Tag Expander Does Not Exist" Compiler Error

If you create a new Silverlight Navigation project, then compile immediately with no changes, you will get the following compiler error:

The tag 'Expander' does not exist in XML namespace 'clr-namespace:System.Windows.Controls;assenbly=System.Windows.Controls'

This is because the Expander element (as well as DockPanel, WrapPanel, HeaderedContentControl, Viewbox, and DataForm have been moved to the Silverlight Toolkit.

To fix this problem:

1. If you haven't already done so, download and install the Silverlight Toolkit (http://www.codeplex.com/Silverlight)

2. Add the System.Windows.Controls.Toolkit assembly to your project

3. Add the following namespace reference to the top of your project's ErrorWindow.xaml file:

xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"4.

4. In the body of the ErrorWindow.xaml file, change the prefix of the Expander control from "controls" to "controlsToolkit". Remember to do this on both the opening and closing tags:

<controlsToolkit:Expander Grid.Row="2" Header="Details" Margin="0, 10, 0, 0" >

 

   <TextBox Text="{Binding ErrorDetails}"
      
Height="100"
      
TextWrapping="Wrap" IsReadOnly="True"
     
VerticalScrollBarVisibility="Auto" />

 

</controlsToolkit:Expander>

Best Regards,
Kevin McNeish
INETA Speaker
Chieft Architect, MM .NET Application Framework
www.oakleafsd.com

Leave a Comment

(required) 

(required) 

(optional)
 

(required) 

If you can't read this number refresh your screen
Enter the numbers above: