public class VersionManager : DependencyObject {
    public static readonly DependencyProperty FilterStringProperty =
        DependencyProperty.Register( "FilterString", typeof( string ),
        typeof( VersionManager ), new UIPropertyMetadata( "no version!" ) );
    public string FilterString {
        get { return (string) GetValue( FilterStringProperty ); }
        set { SetValue( FilterStringProperty, value ); }
    }

    public static VersionManager Instance { get; private set; }

    static VersionManager() {
        Instance = new VersionManager();
    }
}
<TextBox Text="{Binding Source={x:Static local:VersionManager.Instance},
                        Path=FilterString}"/>

 

相关文章:

  • 2021-09-08
  • 2021-10-19
  • 2021-12-26
  • 2022-12-23
  • 2021-06-16
  • 2021-05-17
  • 2021-07-18
猜你喜欢
  • 2021-11-07
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
相关资源
相似解决方案