C# Class Dev2.CustomControls.Controls.SmartTextBox

A TextBox with support for displaying a list of suggestions when the user misspells a word. The user presses the F1 key to display the list of suggestions.
Documentation: http://www.codeproject.com/KB/WPF/SmartTextBox.aspx
Inheritance: System.Windows.Controls.TextBox
Afficher le fichier Open project: Warewolf-ESB/Warewolf Class Usage Examples

Méthodes publiques

Свойство Type Description
SuggestionListBoxStyleProperty System.Windows.DependencyProperty

Méthodes publiques

Méthode Description
GetSpellingError ( ) : System.Windows.Controls.SpellingError

Returns the SpellingError for the word at the current caret index, or null if the current word is not misspelled.

HideSuggestions ( ) : void

Hides the list of suggestions and returns input focus to the input area. If the list of suggestions is not already displayed, nothing happens.

ShowSuggestions ( ) : void

Shows the list of suggestions. If the current word is not misspelled this method does nothing.

Méthodes protégées

Méthode Description
OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void

Hides the list of suggestions.

OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void

Shows/hides the list of suggestions.

OnRenderSizeChanged ( System.Windows.SizeChangedInfo sizeInfo ) : void

Ensures that the list of suggestions is hidden when the TextBox is resized.

OnTextChanged ( System.Windows.Controls.TextChangedEventArgs e ) : void

Hides the list of suggestions if a spelling error no longer exists at the current caret location in the TextBox.

Private Methods

Méthode Description
ApplySelectedSuggestion ( ) : void
AttemptToHideSuggestions ( ) : void
AttemptToShowSuggestions ( ) : void
FindBeginningOfCurrentWord ( ) : int
FindClosestCharacterInCurrentWord ( ) : int
FindEndOfCurrentWord ( ) : int
OnSuggestionListBoxStyleChanged ( DependencyObject depObj, System.Windows.DependencyPropertyChangedEventArgs e ) : void
SmartTextBox ( ) : System
suggestionList_IsKeyboardFocusWithinChanged ( object sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void
suggestionList_ItemContainerGenerator_StatusChanged ( object sender, EventArgs e ) : void
suggestionList_MouseDoubleClick ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
suggestionList_PreviewKeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void

Method Details

GetSpellingError() public méthode

Returns the SpellingError for the word at the current caret index, or null if the current word is not misspelled.
public GetSpellingError ( ) : System.Windows.Controls.SpellingError
Résultat System.Windows.Controls.SpellingError

HideSuggestions() public méthode

Hides the list of suggestions and returns input focus to the input area. If the list of suggestions is not already displayed, nothing happens.
public HideSuggestions ( ) : void
Résultat void

OnMouseDown() protected méthode

Hides the list of suggestions.
protected OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs
Résultat void

OnPreviewKeyDown() protected méthode

Shows/hides the list of suggestions.
protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs
Résultat void

OnRenderSizeChanged() protected méthode

Ensures that the list of suggestions is hidden when the TextBox is resized.
protected OnRenderSizeChanged ( System.Windows.SizeChangedInfo sizeInfo ) : void
sizeInfo System.Windows.SizeChangedInfo
Résultat void

OnTextChanged() protected méthode

Hides the list of suggestions if a spelling error no longer exists at the current caret location in the TextBox.
protected OnTextChanged ( System.Windows.Controls.TextChangedEventArgs e ) : void
e System.Windows.Controls.TextChangedEventArgs
Résultat void

ShowSuggestions() public méthode

Shows the list of suggestions. If the current word is not misspelled this method does nothing.
public ShowSuggestions ( ) : void
Résultat void

Property Details

SuggestionListBoxStyleProperty public_oe static_oe property

Represents the SuggestionListBoxStyle property. This field is read-only.
public static DependencyProperty,System.Windows SuggestionListBoxStyleProperty
Résultat System.Windows.DependencyProperty