Set DataContext type for design-time in Xaml

Связанные публикации: WPF: easiest way to bind to Settings WPF: How to declare own command directly in xaml WPF: Add custom type object to Settings WPF: quick cast for back converter

WPF: collection synchronization

Связанные публикации: Minimize to tray for WPF

WPF: quick cast for back converter

In this example control’s edit value type differs from int:

WPF: Add custom type object to Settings

Just add such code to existing Settings.cs file (Settings.settings -> View code): Связанные публикации: WPF: easiest way to bind to Settings Minimize to tray for WPF WPF: Binding to static property of static class

WPF: easiest way to bind to Settings

Most perfect looks an way with MarkupExtension: Связанные публикации: WPF: Binding to static property of static class Minimize to tray for WPF

WPF: Binding to static property of static class

You don’t need to use `static` properties… you can declare a class using the `Singleton` pattern, so there can only be one instance, just *like* a `static` class. Just use normal `public` CLR properties in this class… something like this (but with properties): Связанные публикации: Minimize to tray for WPF

Minimize to tray for WPF

MinimizeToTray.Enable(this); Связанные публикации: WPF: How to declare own command directly in xaml

WPF: How to declare own command directly in xaml