From 07a280ca14e7639a28a0a219437e3e2526e4a5ed Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Wed, 8 Sep 2021 23:03:49 +0800 Subject: [PATCH] minor modified code --- .../UserControl/Main/LeftMainContent.xaml | 2 +- .../Controls/Text/HighlightTextBlock.cs | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml index f03333d8..f72204a1 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml @@ -49,7 +49,7 @@ - + diff --git a/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs b/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs index 328a677e..102d7763 100644 --- a/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs +++ b/src/Shared/HandyControl_Shared/Controls/Text/HighlightTextBlock.cs @@ -13,11 +13,16 @@ namespace HandyControl.Controls public class HighlightTextBlock : TextBlock { public static readonly DependencyProperty SourceTextProperty = - DependencyProperty.Register("SourceText", typeof(string), typeof(HighlightTextBlock), new PropertyMetadata(null, OnSourceTextChanged)); + DependencyProperty.Register("SourceText", typeof(string), typeof(HighlightTextBlock), + new PropertyMetadata(null, OnSourceTextChanged)); + public static readonly DependencyProperty QueriesTextProperty = - DependencyProperty.Register("QueriesText", typeof(string), typeof(HighlightTextBlock), new PropertyMetadata(null, OnQueriesTextChanged)); + DependencyProperty.Register("QueriesText", typeof(string), typeof(HighlightTextBlock), + new PropertyMetadata(null, OnQueriesTextChanged)); + public static readonly DependencyProperty HighlightBrushProperty = - DependencyProperty.Register("HighlightBrush", typeof(Brush), typeof(HighlightTextBlock), new PropertyMetadata(Brushes.Yellow)); + DependencyProperty.Register("HighlightBrush", typeof(Brush), typeof(HighlightTextBlock), + new PropertyMetadata(Brushes.Yellow)); private static void OnSourceTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((HighlightTextBlock) d).RefreshInlines();