Discovering open source WPF components – Orchestra

In the discovering open source WPF components series, I will look into useful open source components that can be used to create WPF apps. This weeks component is Orchestra.

Shells

Most enterprise apps that are written in WPF either use a ribbon or a metro interface. The developers of Orchestra write lots of different apps and found that they needed a shared code base to get an app up and running in 1 hour. This allows them to write a proof of concept for an app in just a few hours instead of wasting days on setting up the solution correctly.

The cool thing about Orchestra is easily allows you to set a theme color for an app. Once an accent color has been set, the whole look and feel of the app will be updated to reflect that accent color. This provides easy and consistent styling out of the box.

The first choice that one needs to make when writing an application is what shell to use. Orchestra provides the following shells out of the box:

  • Fluent Ribbon shell
  • MahApps Metro shell
  • TaskRunner shell

Fluent Ribbon shell

The Fluent Ribbon shell is a nice shell if you have to host a lot of commands (like Microsoft Office). Below are screenshots of the example application that ships with Orchestra.

image

image

MahApps Metro shell

The MahApps Metro shell is a nice shell if you want to give the user a modern application experience. Below are screenshots of the example application that ships with Orchestra.

image

TaskRunner shell

The TaskRunner shell is a nice shell if you want the user to run a very simple task. It’s like a console application wrapped inside a user interface. Below are screenshots of the example application that ships with Orchestra.

image

Other convenient features

Besides the basic shell implementations, Orchestra provides many more features. Below are the most important ones.

FontImage

The web uses fonts to display images (think of FontAwesome, etc). Orchestra makes this possible in WPF as well. The advantage is that it uses vectors instead of pixels for the images making them look good on all screen resolutions and DPI settings. To use a font image, one only have to use a binding like this:

It will result in something like this:

image

Splash screen

The splash screen is a nice component to introduce your app. When using the shell service, this splash screen will automatically be used for you. Note that this splash screen will automatically use the right accent color in all your apps.

splashscreen

About window

Every app needs an about window. Why create it over and over again for all your applications. The about window in Orchestra will automatically use the icon of the applications and retrieve all the relevant information such as version and name from the assembly.

image

Keyboard shortcut manager

When using a lot of commands, it’s very convenient for your end-users to be able to use keyboard shortcuts. Orchestra goes a step further and allows the end-user to fully customize the keyboard shortcuts.

image

image

Developing enterprise WPF apps – a list of very useful components

At the company I work for, we write lots of enterprise apps using WPF. The base for all of the apps started by using Catel, but we immediately felt we had to fill a lot of gaps. To prevent Catel becoming an unmanageable beast, we decided to create a second group of open source components under the Orc.* branding.

This week, we finally put all the components into their first stable release, meaning we think they are usable in production for WPF apps. This blog post will introduce all the components we have at the moment with a short description. Each component has a description on the corresponding GitHub page as well with examples.

Some history

The idea behind the Orc branding is to have a basic shell (Orchestra) that people can use to get up and running very quickly. You can pick your shell (for example, using a ribbon with Fluent.Ribbon) and start working on your actual application logic instead of the application boilerplate code.

The major advantage for you is that we use these components in over 10 applications. This means very active development (nearly daily updates to the components). We are also trying to make all components have the same look and feel to it really works as a component suite.

The components

The list of components is long, therefore I have chosen to create a table instead of a detailed summary of each component. In upcoming blog posts I plan to highlight more features and details of specific components.

Component name Description
Orc.Analytics Makes it very easy to integration Google Analytics with Catel projects.
Orc.AutomaticSupport Allows the user to easily download a remote file that will validate and provide automatic support to the end-user.
Orc.CommandLine Command line parsing with an easy context class and automatic help system.
Orc.Controls WPF controls like DatePicker, DateTimePicker, TimeSpanPicker, LogViewer, WatermarkTextBox and much more…
Orc.CrashReporting Catch unhandled exceptions and automatically gather information to submit for the end-user as crash reports.
Orc.CsvHelper Small library of extensions and helper methods for the CsvHelper library.
Orc.Feedback Allows developers to easily get feedback from the end-user.
Orc.FilterBuilder Adds complex filtering functionalities to your application. A user can create custom (dynamic) filters in a visual way and store them. Very nice component to allow a user to create filters of collections.
Orc.LicenseManager Check software licenses. Consists of client and server (example) code. Uses Portable.Licensing under the hood.
Orc.LogViewer If the LogViewer in Orc.Controls is too basic for you, this component expands that control by adding filtering and much more features.
Orc.Metadata Provides base classes to store metadata about objects. This can be useful for a lot of information about objects. Might seem abstract, but this prevents you from repeating the same code over and over again.
Orc.Notifications Show desktop notifications to the user with the ability to add commands to the notifications. In a few lines of code you have beautiful notifications in your app.
Orc.NuGetExplorer A custom NuGet explorer. We use this because plugins of our applications are deployed via NuGet. This component allows the users to install and update their plugins.
Orc.ProjectManagement Manage files and projects inside your application. Instead of messing around with lots of handlers and events, this library manages projects for you (can be a file, directory, database, really anything). Other components can subscribe to this if they are interested. Are you writing document-focused apps? You really want this one.
Orc.Search If you need search in your apps, this is the component to use. It can automatically index objects for you (in the background). Provides events to notify you when objects are being indexed or searched for. super fast searching thanks for Lucene.net which is being used under the hood.
Orc.Squirrel Wrapper around Squirrel (the new but better click-once). This library allows you to set up channels (like alpha, beta and stable) and manages the complex stuff under the hood.
Orc.SupportPackage Allows an end-user to create a support package with the right information for you to analyse issues. Because this component is plugin based, you can gather any information you need. The info will automatically be added to a zip file which the user can export and submit.
Orc.SystemInfo Ever needed system info of the end-user? This component gathers all the information. Also used by other components such as Orc.CrashReporting and Orc.SupportPackage.
Orc.WorkspaceManagement Workspaces are a combination of settings that represent the state of the UI. For example, if you want to allow your end-users to customize UI and store the customizations, workspaces is the solution. It also contains a workspace switcher so users can easily switch between workspaces. Since this component is plugin based, it can really be used for anything (from grids to ribbons to docking solutions, etc).
Orchestra Orchestra is a composable shell built on top of Catel. There are several shells like Fluent.Ribbon and MahApps. But Orchestra provides much more features like remappable keyboard shortcuts, splash screen, about window, consistent styling of your apps and much more.

Animating TextBlock in WPF, Silverlight, Windows Phone and WinRT

Recently I needed a nice animating TextBlock when the Text property changes. I was a bit surprised that it was really hard to find an example of that (maybe I didn’t search good), but I decided to implement my own (simple) version of the AnimatingTextBlock control. The requirement was that when the text on the control changes, I could specify two different storyboards with animations to control both the hiding and appearing.

Below is an animated gif demonstrating the control:

AnimatingTextBlock control

How to use the control

The control is really easy to use and behaves just like a TextBlock. Below is the xaml code which shows how to use the control with fading animations:

About the source and room for improvements

The control isn’t perfect, but it does get the job done for me. A major improvement will be that when any Dependency Property of the control changes, it could (or should) be passed on the the inner TextBlock controls. This will allow the users of the control to customize the font styles. I could easily implement it using extension methods available in Catel, but I didn’t want to force a reference to Catel for this control.