WPF client library

The WPF client library handles unhandled exceptions, includes your view models and can help you display error pages and take screenshot of the active window.

Expectations

This page expects that you have installed the WPF nuget packaged and configured it. If you have not, read the configuration page.

Error pages

An error page can optionally be displayed. When a new error is detected, codeRR will now display this:

To activate and configure the feature, add the following line(s) below the other codeRR configuration lines in app.xaml.cs:

// Add a leave feedback text area.
Err.Configuration.UserInteraction.AskUserForDetails = true;

// Ask user if an report may be uploaded.
Err.Configuration.UserInteraction.AskUserForPermission = true;

// Allow user to get notified once you have corrected the issue.
Err.Configuration.UserInteraction.AskForEmailAddress = true;

Examples:

all flags set

only ask for permission

only details

only email

WPF Error handling pipeline

By default, codeRR marks all exceptions as handled in WPF, which means that your application will not crash when an exception is detected.

If you want to prevent that, use the following setting.

Err.Configuration.DoNotMarkExceptionsAsHandled();

Context information

The context collections are included in the WPF library.

OpenForms

codeRR collects information from all open forms using reflection.

The information includes all controls and their configuration (position, content, visibility etc)

Control content is included

Screenshots

Screenshots can be activated by one of the following configuration lines:

Err.Configuration.TakeScreenshots();

You will see the following under the incident in your codeRR server:

View models

codeRR collects information from all viewModels in the open forms.

What to do next

Edit page at GitHub Create a documentation ticket Ask a question This page is generated using the open source project MarkdownWeb.