WPF Samples Application Source Code Viewer

by Avatar Bill Henning (Actipro) - 1 comment
Tuesday, May 26, 2020 at 5:12pm

Actipro WPF Controls v2020.1 development is in progress, and the new version’s main goals are to modernize our UI control features/themes, and make theme customization much easier.

In the previous post, we took a look at our redesigned WPF samples application that will launch in the 2020.1 version. The new design focuses on a modern aesthetic that makes great use of our themes-related updates for v2020.1.

One of the user comments in that post was that it would be great to support viewing of the sample’s code right from within the application. This is something we also planned on adding, so let’s see what that feature looks like.

Viewing Sample Code

When you navigate to a sample, a “View Source Code for This Sample” menu item is available. We also have added a status bar button with a “</>” glyph that accesses the same feature.

The menu item to view sample source code

When clicked, the Source Code Viewer window will open and the selected sample’s main XAML code will be displayed by default.

The XAML source for the sample

The Source Code Viewer window opens as a separate window so that if you have a multi-monitor setup, you can display the code on a different monitor from the samples application itself.

The Source Code Viewer window has the full sample source folder hierarchy on the left. Select a different file from the same sample or a different sample altogether to see additional source code.

The C# source code for a class in the sample

Here we’ve selected a view-model C# class for the same sample.


This Source Code Viewer is a great example of combining multiple Actipro WPF products (Docking/MDI, Shell, and SyntaxEditor) together in a simple way to implement a professional-looking code explorer. We think this new feature in the v2020.1 samples application will be a real time-saver for our customers when wanting to learn more about how to use our WPF Control products.

Post in the comments below if you have any feedback or questions about the new Sample Code Viewer.

Tags: developing, wpf

Actipro's WPF Controls

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Learn More

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Includes editors, docking windows, MDI, property grids, charts, tree controls, ribbons, gauges, themes, and much more.

Learn More Download Free Trial

Comments (1)

Posted 4 years ago by JesperTreetop

Great addition - this can save a lot of time going back and forth.

Add Comment

Please log in to a validated account to post comments.