CompletionFilter Class
Represents an object that can filter out items from an IntelliPrompt completion list using a delegate, and is also capable of generating filter user interface in the default completion list implementation.
public class CompletionFilter : ICompletionFilter, IKeyedObject
- Inheritance:
- object object
- Implements:
- ICompletionFilter IKeyedObject
Constructors
CompletionFilter(string, CompletionFilterPredicate)
Initializes a new instance of the CompletionFilter
class.
public CompletionFilter(string key, CompletionFilterPredicate predicate)
Parameter | Type | Description |
---|---|---|
key | string | The string-based key that identifies the object. |
predicate | CompletionFilterPredicate | A CompletionFilterPredicate containing the filter logic. |
Properties
Content
Gets or sets the content to display in the generated user interface control for the filter.
public object Content { get; set; }
Property Value
- object:
The content to display in the generated user interface control for the filter.
Remarks
If this filter generates a button, the content is generally an image. If this filter generates a tab, the content is generally a string.
DisplayMode
Gets or sets the CompletionFilterDisplayMode that indicates how the filter should be represented in the completion list popup user interface.
public CompletionFilterDisplayMode DisplayMode { get; set; }
Property Value
- CompletionFilterDisplayMode:
The CompletionFilterDisplayMode that indicates how the filter should be represented in the completion list popup user interface.
GroupName
Gets or sets the name of the group that contains this filter.
public string GroupName { get; set; }
Property Value
- string:
The name of the group that contains this filter.
Remarks
If this filter generates a button, buttons with the same group name will be placed together and separated from other button groups by a separator.
IsActive
Gets or sets whether the filter is currently active.
public bool IsActive { get; set; }
Property Value
- bool:
true
if the filter is currently active; otherwise,false
.
Remarks
When the filter is not active, it will not have its Filter(ICompletionSession, ICompletionItem) method to examine items.
Key
Gets the string-based key that identifies the object.
KeyGesture
Gets or sets the key gesture to use to toggle activation of the filter.
public KeyGesture KeyGesture { get; set; }
Property Value
- KeyGesture:
The key gesture to use to toggle activation of the filter.
ToolTip
Gets or sets the content to display in the generated user interface control's tooltip for the filter.
public object ToolTip { get; set; }
Property Value
- object:
The content to display in the generated user interface control's tooltip for the filter.
Methods
Filter(ICompletionSession, ICompletionItem)
Examines the specified completion item to see if meets filter conditions.
public virtual CompletionFilterResult Filter(ICompletionSession session, ICompletionItem item)
Parameter | Type | Description |
---|---|---|
session | ICompletionSession | The ICompletionSession in which this filter is active. |
item | ICompletionItem | The ICompletionItem to examine. |
Returns
- CompletionFilterResult:
A CompletionFilterResult value that indicates if the item meets filter conditions.