Skip to main content

Microsoft Silverlight

Answered Question RTW causing Application_Exit...somewhereRSS Feed

(0)

niversen
niversen

Member

Member

2 points

4 Posts

RTW causing Application_Exit...somewhere

I'm upgrading our codebase from B2 to RTW and I'm having a problem where Application_Exit is called from somewhere. I've setup breakpoints and stepped through as much as I can, but something is calling Application_Exit and I can't figure out where, or how to prevent it.  I've got try/catch in my code as well as an Unhandled Exception setup, but nothing is getting caught.

 Anyone have any advice for tracking this down?

coolio
coolio

Member

Member

369 points

114 Posts

Re: RTW causing Application_Exit...somewhere

Check your style definitions. See also this blogpost => http://www.andybeaulieu.com/Home/tabid/67/EntryID/118/Default.aspx

No more secrets with Silverlight Spy 3

niversen
niversen

Member

Member

2 points

4 Posts

Re: RTW causing Application_Exit...somewhere

 Thats the path I'm currently going down.  Its a reasonably big Silverlight app, so it takes a while to go control by control.  I really wish there was a way to at least narrow down which control is calling Application_Exit.

niversen
niversen

Member

Member

2 points

4 Posts

Answered Question

Re: RTW causing Application_Exit...somewhere

 My problem ended up being the data grid changes.  Apparently if you are still using Header, it'll just go to Application_Exit without giving you an error message.  Its not listed in the Breaking Changes document, but is here: http://blogs.msdn.com/scmorris/archive/2008/10/15/post-beta-2-breaking-changes.aspx

 Original:

<dg:DataGridTextColumn.Header>
      <HyperlinkButton Content="Asset Type" Tag="AssetType" Click="Sort_Click" />
 </dg:DataGridTextColumn.Header>

 

New:

<dg:DataGridTextColumn.HeaderStyle>
   <Style TargetType="Primitives:DataGridColumnHeader">
      <Setter Property="ContentTemplate">
         <Setter.Value>
            <DataTemplate>
               <HyperlinkButton Content="Asset Type" Tag="AssetType" Click="Sort_Click" />
            </DataTemplate>
         </Setter.Value>
      </Setter>
   </Style>
</dg:DataGridTextColumn.HeaderStyle>
 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities