Click or drag to resize

SearchEdit Class

A SearchEdit is a search box similar to the Windows Search in the upper right corner of the Windows Explorer and provides a search for files and folders.
Inheritance Hierarchy

Namespace:  Jam.Shell.WPF.Controls
Assembly:  ShellBrowserWPF (in ShellBrowserWPF.dll) Version: 1.3.1
Syntax
public class SearchEdit : TextBox, IShellControlConnectorTarget

The SearchEdit type exposes the following members.

Constructors
  NameDescription
Public methodSearchEdit
Default constructor.
Top
Properties
  NameDescription
Public propertyAutoSearch
Gets or sets a value indicating whether the control will start searching automatically after a short delay or if the search needs to be triggered by pressing Enter. This is a dependency property.
Public propertyFolderIdList
The ItemIdList to use for synchronization.
Public propertyHasText
Gets or sets a value indicating whether this object currently contains any text. This is a dependency property.
Public propertyHintColor
Gets or sets the color of the hint text and search symbol. This is a dependency property.
Public propertyHintText
Gets or sets the hint text. This is a dependency property.
Public propertySearchFolderIdList
Gets the ItemIdList of the searchfolder. Enumerating contains the search result.
Public propertySearchScope
Gets or sets the search scope. This is a dependency property.
Public propertyShellControlConnector
Gets or sets a ShellControlConnector.
Top
Methods
  NameDescription
Public methodFolderChanged
Changes the displayed folder in all connected controls.
Public methodOnApplyTemplate
Is called when a control template is applied.
(Overrides TextBoxBaseOnApplyTemplate.)
Protected methodOnKeyDown
Invoked whenever an unhandled KeyDown attached routed event reaches an element derived from this class in its route. Implement this method to add class handling for this event.
(Overrides TextBoxBaseOnKeyDown(KeyEventArgs).)
Protected methodOnPropertyChanged
Called when one or more of the dependency properties that exist on the element have had their effective values changed.
(Overrides TextBoxOnPropertyChanged(DependencyPropertyChangedEventArgs).)
Protected methodOnTextChanged
Is called when content in this editing control changes.
(Overrides TextBoxBaseOnTextChanged(TextChangedEventArgs).)
Public methodSelectedFileChange
Changes the displayed file in all connected controls.
Top
Fields
  NameDescription
Public fieldStatic memberAutoSearchProperty
Identifies the AutoSearch dependency property.
Public fieldStatic memberFolderIdListProperty
Identifies the FolderIdList dependency property.
Public fieldStatic memberHasTextProperty
Identifies the HasText dependency property.
Public fieldStatic memberHintColorProperty
Identifies the HintColor dependency property.
Public fieldStatic memberHintTextProperty
Identifies the HintText dependency property.
Public fieldStatic memberSearchScopeProperty
Identifies the SearchScope dependency property.
Top
Remarks

The search itself is done by Windows and supports the Advanced Query Syntax. The matching results are mapped to a virtual folder called "search folder".

The results of a search can be presented in either the ExplorerBrowser or a "Jam.Shell.WPF.Controls.Winforms.ShellListView" control. For this synchronize the FolderIdList dependency property with the Location or the ShellListView.FolderIdList property. They can be connected using a ShellControlConnector instance. In both cases an incoming value is interpreted as search scope; together with the search phrase the SearchEdit creates a new SearchFolder, an ItemIdList representing the search.

By default the search is triggered automatically a short period of time after the search text changes. This can be turned off using the AutoSearch property. If off, the search will only be triggered, pressing the Enter key.

See Also