31 lines
667 B
C#
31 lines
667 B
C#
// Copyright (c) 2023 schick Informatik
|
|
// Description: Binding extension to allow shorter declaraction of bindings that persist
|
|
// to the application settings
|
|
//
|
|
|
|
using System.Windows.Data;
|
|
|
|
namespace BreCalClient
|
|
{
|
|
public class SettingBindingExtension : Binding
|
|
{
|
|
|
|
public SettingBindingExtension()
|
|
{
|
|
Initialize();
|
|
}
|
|
|
|
public SettingBindingExtension(string path) : base(path)
|
|
{
|
|
Initialize();
|
|
}
|
|
|
|
private void Initialize()
|
|
{
|
|
this.Source = BreCalClient.Properties.Settings.Default;
|
|
this.Mode = BindingMode.TwoWay;
|
|
}
|
|
|
|
}
|
|
}
|