From 042795f0047e6bea45021b00d496e3b397bea936 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 26 Oct 2011 17:02:07 +0200 Subject: [PATCH] add some missing documentation --- .../Search/ISearchStrategy.cs | 3 ++ .../Search/SearchPanel.cs | 33 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/ISearchStrategy.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/ISearchStrategy.cs index 039608208b..5c92993fea 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/ISearchStrategy.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/ISearchStrategy.cs @@ -36,6 +36,9 @@ namespace ICSharpCode.AvalonEdit.Search /// public interface ISearchResult : ISegment { + /// + /// Replaces parts of the replacement string with parts from the match. (e.g. $1) + /// string ReplaceWith(string replacement); } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs index 82003ef3e0..c2f477dd56 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs @@ -21,6 +21,9 @@ using ICSharpCode.AvalonEdit.Rendering; namespace ICSharpCode.AvalonEdit.Search { + /// + /// Provides search functionality for AvalonEdit. It is displayed in the top-right corner of the TextArea. + /// public class SearchPanel : Control { TextArea textArea; @@ -30,46 +33,76 @@ namespace ICSharpCode.AvalonEdit.Search TextBox searchTextBox; SearchPanelAdorner adorner; + /// + /// Dependency property for . + /// public static readonly DependencyProperty UseRegexProperty = DependencyProperty.Register("UseRegex", typeof(bool), typeof(SearchPanel), new FrameworkPropertyMetadata(false, SearchPatternChangedCallback)); + /// + /// Gets/sets whether the search pattern should be interpreted as regular expression. + /// public bool UseRegex { get { return (bool)GetValue(UseRegexProperty); } set { SetValue(UseRegexProperty, value); } } + /// + /// Dependency property for . + /// public static readonly DependencyProperty MatchCaseProperty = DependencyProperty.Register("MatchCase", typeof(bool), typeof(SearchPanel), new FrameworkPropertyMetadata(false, SearchPatternChangedCallback)); + /// + /// Gets/sets whether the search pattern should be interpreted case-sensitive. + /// public bool MatchCase { get { return (bool)GetValue(MatchCaseProperty); } set { SetValue(MatchCaseProperty, value); } } + /// + /// Dependency property for . + /// public static readonly DependencyProperty WholeWordsProperty = DependencyProperty.Register("WholeWords", typeof(bool), typeof(SearchPanel), new FrameworkPropertyMetadata(false, SearchPatternChangedCallback)); + /// + /// Gets/sets whether the search pattern should only match whole words. + /// public bool WholeWords { get { return (bool)GetValue(WholeWordsProperty); } set { SetValue(WholeWordsProperty, value); } } + /// + /// Dependency property for . + /// public static readonly DependencyProperty SearchPatternProperty = DependencyProperty.Register("SearchPattern", typeof(string), typeof(SearchPanel), new FrameworkPropertyMetadata("", SearchPatternChangedCallback)); + /// + /// Gets/sets the search pattern. + /// public string SearchPattern { get { return (string)GetValue(SearchPatternProperty); } set { SetValue(SearchPatternProperty, value); } } + /// + /// Dependency property for . + /// public static readonly DependencyProperty MarkerBrushProperty = DependencyProperty.Register("MarkerBrush", typeof(Brush), typeof(SearchPanel), new FrameworkPropertyMetadata(Brushes.LightGreen, MarkerBrushChangedCallback)); + /// + /// Gets/sets the Brush used for marking search results in the TextView. + /// public Brush MarkerBrush { get { return (Brush)GetValue(MarkerBrushProperty); } set { SetValue(MarkerBrushProperty, value); }