views:

74

answers:

0

(X-posted to silverlight forums)

Created a Silverlight class library in Visual Studio 2008. Open it in Blend 3 so that I can edit the visual elements using a nice wysiwyg editor rather than hand hacking the xaml.

The library builds in both Blend and VS2008. Apps built using the library build in both, and run properly.

Whenever I try to open a xaml file in that library, or an application that uses it, I get "Catastrophic Failure (Exception from HRESULT 0x8000FCFFF (E_UNEXPECTED))"

This is the error message. http://farm5.static.flickr.com/4059/4275995655_0f4ae2eda1_o.jpg

This is part of the code:

<t:BaseUserControl x:Class="ArchG2.CodeLibrary.Sl.MeasurementIndicatorGrid"
             xmlns:t="clr-namespace:ArchG2.CodeLibrary.Sl;assembly=ArchG2.CodeLibrary.Sl"
             xmlns:my=   "clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Gauge"
             xmlns:gauge="clr-namespace:Telerik.Windows.Controls.Gauges;assembly=Telerik.Windows.Controls.Gauge"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"            
             Width="600" Height="325">

The problem appears to be t:BaseUserControl.

BaseUserControl, which is descended from UserControl, encapsulates all the logging, configuration file reading, and other operations that all our controls use, which is why it's the base class. Since it has no visual elements it is a pure cs control, with no xaml.

It is declared:

public class BaseUserControl: Abr.CodeLibrary.Sl.Utils.BaseUserControl
  {
  } //BaseUserControl

Abr.CodeLibrary.Sl.Utils.BaseUserControl is declared:

public class BaseUserControl : UserControl, IStatusMessageControlProvider

Where UserControl is the System.Windows.Controls UserControl. i.e. the standard Silverlight user control.

It, too, is pure csharp, with no xaml.

The library the base control is in is referenced in References.

If I remove the base class reference, set the controls I am creating to descend directly from UserControl, and comment out all references in the cs code to the base class, it displays.

While we're at it, any way to extract text from error messages in Blend 3?