wpf-15628-controls-and-libraries-property-grid-visual-elements-search-box.md
The built-in Search Box provides an easy way to search through properties.
The table below lists the main properties affecting element behavior and appearance.
|
Characteristics
|
Members
| | --- | --- | |
Visibility
|
PropertyGridControl.ShowSearchBox
| |
Searching
|
PropertyGridControl.FilterMode
| |
User Filter Expression
|
PropertyGridControl.UserFilterCriteria
| |
Keyboard Operations
|
Ctrl+F - Moves focus to the Search Box.
Esc - Clears the Search Box.
Down Arrow - Moves focus from the Search Box to the data area of the grid.
|
In its simplest form, a search criteria consists of a single word. To search for a string containing a space character, specify this string in quotation marks. Without quotation marks, words separated by the space character are treated as individual conditions (using the OR logical operator by default).
Precede a condition with “+” to select records that match this condition. Other records will be excluded from the result. The “+” specifier allows you to implement the logical AND operator.
Precede a condition with “-“ to exclude records that match this condition from the result set.
Examples:
| Search Criteria | Description |
|---|---|
register | Selects records that contain the “register” string in any search column. |
check register Dave | Selects records that contain the “check”, “register” or “Dave” strings in any search column. |
"check register" | Selects records that contain “check register” in any search column. |
screen +"Richard Fisher" | Selects records that contain both “screen” and “Richard Fisher” in search columns. |
data +entry -mark | Selects records that contain both “data” and “entry” in search columns, excluding records that contain “mark”. |
menu mask -file | Selects records that contain “menu” or “mask”, excluding records that contain “file”. |
Note
Searches performed in the Search Box are case insensitive.