Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to show the Exception in Silverlight Message box. If any one knows please give answer. Thanks in advance.
Posted
Comments
[no name] 23-Jul-13 8:11am    
Why don't you simply try it yourself and find out?
[no name] 23-Jul-13 8:52am    
lol

Use below code to show Error in message box

C#
public partial class ErrorWindow : ChildWindow
    {
        public ErrorWindow(Exception e)
        {
            InitializeComponent();
            if (e != null)
            {
                ErrorTextBox.Text = e.Message + Environment.NewLine + Environment.NewLine + e.StackTrace;
            }
        }
     }
 
Share this answer
 
You can achieve that using Unhandled_Exception event in app.xaml.cs file.
As all the unhandled silverlight exceptions can be caught here.
 
Share this answer
 
You can achieve that using Unhandled_Exception event in app.xaml.cs file.
As all the unhandled silverlight exceptions can be caught here.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900