 |
|
|
|
Silverlight 2 RC0 Crash without Error
|
|
|
 |
|
Location: Blogs Andy's Blog |
|
| Posted by: host |
9/26/2008 7:15 PM |
While porting a Silverlight 2 Beta 2 app to RC0, I suddenly found my newly converted app would just terminate shortly after load. No exception messages, no JIT debugging, just death. The end result is that a blank area is left where the Silverlight application is supposed to be rendered. After setting breakpoints all over the place, I found that the Application_Exit event was being hit, but the Application_UnhandledException event was never being fired.
If this happens to you, I would recommend checking your Style definitions. In my case, I had a ListBoxItem style defined in my App.xaml, with a Foreground property. This property was fine in SL B2, but causes the nasty crash in SL RC0:
<Style x:Key="ListBoxItemStyle1" TargetType="ListBoxItem">
<Setter Property="Foreground" Value="#FF000000" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Grid x:Name="Root">
<ItemsPresenter />
<ContentPresenter
Content="{TemplateBinding Content}"
Foreground="{TemplateBinding Foreground}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
|
|
| Permalink |
Trackback |
|
|
 |
|
 |
|
|