Simple and Generic ICommand Implementation for Usage in XAML

Preface The Commanding Overview says “Commanding is an input mechanism in Windows Presentation Foundation (WPF) which provides input handling at a more semantic level than device input. Examples of commands are the Copy, Cut, and Paste operations found on many applications.” Well, one should extent the definition and mention Windows …

Home-made Private Accessor for Visual Studio 2012+

Why Home-made? Short answer: Starting with Visual Studio 2012, private accessors cannot be created any more by the IDE. It seems that this does not bother too many people. The ‘Bring Back Private Accessor’ suggestion on UserVoice has not found any supporters right now. Nevertheless, I still need access to …

Unit-Testing of Private Async Methods with Visual Studio

Description Given there is the need to unit-test a private async method. The class to be tested might look like this: public ClassWithPrivateAsyncMethod { // Some stuff private async Task PrivateMethodAsync ( string input ) { // Call some async framework method var result = await SomeFrameworkMethodAsync(input); // do something …

Using Windows Store App Resource Libraries in C# / XAML

Introduction Given there is a Windows Store app. Some of the resources that this app needs are part of a library. This library contains a XAML file (ApplicationStyles.xaml) for application specific styles and the StandardStyles.xaml that is generated when a new Windows Store App (XAML) project is created. ApplicationStyles.xaml uses …