using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;

namespace WPF绑定元素_2_多绑定;

/// <summary>
///     Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();

        // 创建一个 Binding 对象
        var binding = new Binding("Value")
        {
            Source = TextBlockSlider,
            Delay = 500 // 设置延迟时间
        };

        // 将 Binding 应用到 TextBox 的 Text 属性上
        ExactSizeForSlider.SetBinding(TextBox.TextProperty, binding);
    }
}