|
Blog: WPF
In one of my recent projects, I had to implement an undo/redo mechanism for an observable object graph. The usual approach to this problem is to implement commands which operate on the object graph and provide Do() and Undo() methods. The problem was, that a great portion of the business logic was already implemented and was not command-based. This is why I had to find a solution which works transparently on the property change events of an object graph whose objects implement the INotifyCollectionChanged interface and use the ObservableCollection class for collection properties. The solution to the problem was to […] Read more...
Tags: .NET, INotifyPropertyChanged, MyToolkit, undo/redo, WPF, XAML
In this article I’ll describe the rules and practices I’m following for XAML and MVVM application development. I’m using the described techniques since multiple years and they have proven themselves for me. Most of the described rules apply for all types of XAML projects – Windows Store, Windows Phone, Silverlight and WPF projects. Sample code: The source code of the application Visual JSON Editor contains sample implementations for most of the discussed recommendations. Some sample code snippets in this article use the MVVM classes from the MyToolkit library which is developed by myself. Project file structure All MVVM/XAML applications should […] Read more...
Tags: .NET, Architecture, C#, MVVM, UWP, WinRT, WPF, XAML
Have you ever had the need to use an application (.exe) as a command line tool when started in the console (cmd.exe) and as GUI application when started from the Explorer shell? This article explains a possible implementation for this requirement. To be clear: I didn’t find the perfect solution; a Windows .NET application is either a console application or a Windows application. Either type can be used in the opposite mode, but both variants have some drawbacks. This article describes the solution which I think has the least disadvantages. The solution works by defining the application as console application […] Read more...
Tags: .NET, C#, Command Line, Console Application, WPF
This article provides a simple guide about how to quickly create a WiX installer project for an existing WPF application or another Windows desktop application. Continue reading at my company’s blog… Read more...
Tags: .NET, C#, Deployment, Installer, WiX, WPF
Often, we face the problem that our customers need highly configurable applications but there is no time to develop rich configuration GUIs. This article describes a possible solution which is a compromise between editing raw configuration files and implementing rich configuration GUIs. The idea: First, implement some simple POCO classes (Plain Old CLR Object) representing the structure of the required configuration. Using a JSON serializer these classes can then be written and read from a JSON configuration file. Additionally, store an auto-generated JSON schema file alongside the configuration file. To edit the configuration file after its creation, use the tool […] Read more...
Tags: .NET, C#, Configuration Management, JSON, WPF
|
|
|