Files

36 lines
1.4 KiB
C#
Raw Permalink Normal View History

2026-02-18 21:41:30 +08:00
using System.Windows;
2026-02-21 16:31:24 +08:00
namespace ShrlAlgoToolkit.RevitAddins.Common.Assists
2026-02-18 21:41:30 +08:00
{
public class TextSearchAssist
{
// Using a DependencyProperty as the backing store for IsTextMatch. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsTextMatchProperty =
2026-02-24 11:34:18 +08:00
DependencyProperty.RegisterAttached("IsTextMatch", typeof(bool), typeof(TextSearchAssist), new UIPropertyMetadata(false));
2026-02-18 21:41:30 +08:00
// Using a DependencyProperty as the backing store for SearchValue. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SearchValueProperty =
2026-02-24 11:34:18 +08:00
DependencyProperty.RegisterAttached("SearchValue", typeof(string), typeof(TextSearchAssist),
2026-02-18 21:41:30 +08:00
new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.Inherits));
public static bool GetIsTextMatch(DependencyObject obj)
{
return (bool)obj.GetValue(IsTextMatchProperty);
}
public static string GetSearchValue(DependencyObject obj)
{
return (string)obj.GetValue(SearchValueProperty);
}
public static void SetIsTextMatch(DependencyObject obj, bool value)
{
obj.SetValue(IsTextMatchProperty, value);
}
public static void SetSearchValue(DependencyObject obj, string value)
{
obj.SetValue(SearchValueProperty, value);
}
}
}