From 6f97ab609ab586e9e9f01d6062aa1f6334f57b76 Mon Sep 17 00:00:00 2001 From: TTLC198 <41226242+TTLC198@users.noreply.github.com> Date: Sat, 9 Sep 2023 16:51:05 +0300 Subject: [PATCH] Added BindingProxy class --- HSMonitor/Utils/BindingProxy.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 HSMonitor/Utils/BindingProxy.cs diff --git a/HSMonitor/Utils/BindingProxy.cs b/HSMonitor/Utils/BindingProxy.cs new file mode 100644 index 0000000..e40a72f --- /dev/null +++ b/HSMonitor/Utils/BindingProxy.cs @@ -0,0 +1,18 @@ +using System.Windows; + +namespace HSMonitor.Utils; + +public class BindingProxy : System.Windows.Freezable +{ + protected override Freezable CreateInstanceCore() { + return new BindingProxy(); + } + + public object Data { + get { return (object)GetValue(DataProperty); } + set { SetValue(DataProperty, value); } + } + + public static readonly DependencyProperty DataProperty = + DependencyProperty.Register(nameof(Data), typeof(object), typeof(BindingProxy), new PropertyMetadata(null)); +} \ No newline at end of file