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)
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 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
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
The CompletionFilterDisplayMode that indicates how the filter should be represented in the completion list popup user interface.
public CompletionFilterDisplayMode DisplayMode { get; set; }
Property Value
GroupName
The name of the group that contains this filter.
public string? GroupName { get; set; }
Property Value
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
Indicates whether the filter is currently active.
public bool IsActive { get; set; }
Property Value
- bool:
trueif 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
The string-based key that identifies the object.
KeyGesture
The key gesture to use to toggle activation of the filter.
ToolTip
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.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()