C# Class Microsoft.Windows.Controls.TextSearchInternal

Almost same as TextSearch, except for the public properties (i.e. TextPath), which are used from TextSearch. Text Search is a feature that allows the user to quickly access items in a set by typing prefixes of the strings.
Inheritance: System.Windows.DependencyObject
ファイルを表示 Open project: kasicass/kasicass Class Usage Examples

Private Properties

Property Type Description
AddCharToPrefix void
CauseTimeOut void
ConvertToPlainText string
CreateBinding System.Windows.Data.Binding
DeleteLastCharacter bool
DoHierarchicalSearch bool
DoSearch bool
EnsureInstance TextSearchInternal
FindMatchingPrefix int
FindMatchingPrefix int
FindMatchingPrefix int
FindMatchingPrefix object
GetCulture System.Globalization.CultureInfo
GetCurrentPrefix string
GetInstance TextSearchInternal
GetPrimaryText string
GetPrimaryText string
GetPrimaryTextFromItem string
GetPrimaryTextPath string
OnTimeout void
ResetState void
ResetTimeout void
TextSearchInternal System
TypeAKey void

Private Methods

Method Description
AddCharToPrefix ( string newChar ) : void
CauseTimeOut ( ) : void
ConvertToPlainText ( object o ) : string
CreateBinding ( object item, string primaryTextPath ) : Binding
DeleteLastCharacter ( ) : bool

Called when the user presses backspace.

DoHierarchicalSearch ( string nextChar ) : bool

TextSearchInternal in an ItemsControl containing ItemsControls as children (i.e. RibbonGallery) performs TextSearchInternal on the second level Items.

DoSearch ( string nextChar ) : bool

Called by consumers of TextSearchInternal when a TextInput event is received to kick off the algorithm.

EnsureInstance ( ItemsControl itemsControl ) : TextSearchInternal

Get the instance of TextSearchInternal attached to the given ItemsControl or make one and attach it if it's not.

FindMatchingPrefix ( ItemsControl itemsControl, string prefix, bool doHierarchicalSearch ) : int

Helper function called by Editable ComboBox to search through items.

FindMatchingPrefix ( ItemsControl itemsControl, string primaryTextPath, string prefix, string newChar, int startItemIndex, bool lookForFallbackMatchToo, bool &wasNewCharUsed ) : int
FindMatchingPrefix ( ItemsControl itemsControl, string primaryTextPath, string prefix, string newChar, int startItemIndex, bool lookForFallbackMatchToo, bool &wasNewCharUsed, bool inHierarchicalSearch, bool fallbackFirstItemToo ) : int

Searches through the given itemCollection for the first item matching the given prefix.

-------------------------------------------------------------------------- Incremental Type Search algorithm -------------------------------------------------------------------------- Given a prefix and new character, we loop through all items in the collection and look for an item that starts with the new prefix. If we find such an item, select it. If the new character is repeated, we look for the next item after the current one that begins with the old prefix**. We can optimize by performing both of these searches in parallel. **NOTE: Win32 will only do this if the old prefix is of length 1 - in other words, first-character-only matching. The algorithm described here is an extension of ITS as implemented in Win32. This variant was described to me by JeffBog as what was done in AFC - but I have yet to find a listbox which behaves this way. --------------------------------------------------------------------------

FindMatchingPrefix ( ItemsControl itemsControl, string prefix, bool doHierarchicalSearch, ItemsControl &matchedChildItemsControl ) : object

Helper function called by Editable ComboBox to search through items.

GetCulture ( DependencyObject element ) : CultureInfo
GetCurrentPrefix ( ) : string
GetInstance ( DependencyObject d ) : TextSearchInternal
GetPrimaryText ( FrameworkElement element ) : string
GetPrimaryText ( object item, string primaryTextPath ) : string
GetPrimaryTextFromItem ( ItemsControl itemsControl, object item, bool doHierarchicalSearch ) : string

Internal helper method that uses the same primary text lookup steps but doesn't require the user passing in all of the bindings that we need.

GetPrimaryTextPath ( ItemsControl itemsControl, bool doHierarchicalSearch ) : string
OnTimeout ( object sender, EventArgs e ) : void
ResetState ( ) : void
ResetTimeout ( ) : void
TextSearchInternal ( ItemsControl itemsControl ) : System

Make a new TextSearchInternal instance attached to the given object. Create the instance in the same context as the given DO.

TypeAKey ( string c ) : void