Partager via


WindowSearchCustomFilter Class

Represents a base class from which users can derive classes to implement advanced search filters for use by the search control for window search.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.PlatformUI.WindowSearchFilter
    Microsoft.VisualStudio.PlatformUI.WindowSearchCustomFilter

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Class WindowSearchCustomFilter _
    Inherits WindowSearchFilter _
    Implements IVsWindowSearchCustomFilter, IVsWindowSearchFilter
public class WindowSearchCustomFilter : WindowSearchFilter, 
    IVsWindowSearchCustomFilter, IVsWindowSearchFilter
public ref class WindowSearchCustomFilter : public WindowSearchFilter, 
    IVsWindowSearchCustomFilter, IVsWindowSearchFilter
type WindowSearchCustomFilter =  
    class 
        inherit WindowSearchFilter 
        interface IVsWindowSearchCustomFilter 
        interface IVsWindowSearchFilter 
    end
public class WindowSearchCustomFilter extends WindowSearchFilter implements IVsWindowSearchCustomFilter, IVsWindowSearchFilter

The WindowSearchCustomFilter type exposes the following members.

Constructors

  Name Description
Public method WindowSearchCustomFilter Creates a new instance of a search filter with an apply-filter method for use by the search control for window search.

Top

Properties

  Name Description
Public property DisplayText Gets or sets the display text for the search filter (Inherited from WindowSearchFilter.)
Public property Tooltip Gets or sets the tooltip text for the search filter (Inherited from WindowSearchFilter.)

Top

Methods

  Name Description
Public method ApplyFilter Override this method in derived classes to provide specific implementation for the custom filter, by manipulating the search text from the search control and changing the selection as needed.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

Search filters appear as push buttons in the search control’s popup.

Simple filters such as those implemented by WindowSearchSimpleFilter automatically append the filter token (FilterField:DefaultFilterValue) to the search control text.

This class is used to implement advanced filtering of the search control text, since the user has full control over the search field and the selection to be set in the search control after the filter is applied.

Custom filters are used to avoid adding multiple filter tokens with the same field. Custom filters are also used to select the filter value if the caret position in the search control is already within a filter token.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.PlatformUI Namespace