Skip to main content
Home Forums Silverlight Programming Programming with .NET - General RTW causing Application_Exit...somewhere
3 replies. Latest Post by niversen on October 17, 2008.
(0)
niversen
Member
2 points
4 Posts
10-15-2008 3:27 PM |
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
369 points
114 Posts
10-15-2008 3:42 PM |
Check your style definitions. See also this blogpost => http://www.andybeaulieu.com/Home/tabid/67/EntryID/118/Default.aspx
10-16-2008 9:45 AM |
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.
10-17-2008 10:54 AM |
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>