Skip to main content

TextSearch Class

Definition

Assembly:Avalonia.Controls
Package:Avalonia

Allows to customize text searching in Avalonia.Controls.Primitives.SelectingItemsControl.

public class TextSearch

Inheritance: object -> TextSearch

Methods

NameDescription
GetTextGets the value of the Avalonia.Controls.Primitives.TextSearch.TextProperty attached property from a given Avalonia.Controls.Control.
GetTextBindingGets the value of the Avalonia.Controls.Primitives.TextSearch.TextBindingProperty attached property from a given element.
SetTextSets the value of the Avalonia.Controls.Primitives.TextSearch.TextProperty attached property to a given Avalonia.Controls.Control.
SetTextBindingSets the value of the Avalonia.Controls.Primitives.TextSearch.TextBindingProperty attached property to a given element.

GetText Method

Gets the value of the Avalonia.Controls.Primitives.TextSearch.TextProperty attached property from a given Avalonia.Controls.Control.

public string GetText(Avalonia.AvaloniaObject element)

Parameters

element Avalonia.AvaloniaObject

The control.

Returns

string

The search text.

GetTextBinding Method

Gets the value of the Avalonia.Controls.Primitives.TextSearch.TextBindingProperty attached property from a given element.

public Avalonia.Data.BindingBase GetTextBinding(Avalonia.AvaloniaObject element)

Parameters

element Avalonia.AvaloniaObject

The element.

Returns

Avalonia.Data.BindingBase

The search text binding.

SetText Method

Sets the value of the Avalonia.Controls.Primitives.TextSearch.TextProperty attached property to a given Avalonia.Controls.Control.

public void SetText(Avalonia.AvaloniaObject element, string text)

Parameters

element Avalonia.AvaloniaObject

The control.

text string

The search text to set.

SetTextBinding Method

Sets the value of the Avalonia.Controls.Primitives.TextSearch.TextBindingProperty attached property to a given element.

public void SetTextBinding(Avalonia.AvaloniaObject element, Avalonia.Data.BindingBase value)

Parameters

element Avalonia.AvaloniaObject

The element.

value Avalonia.Data.BindingBase

The search text binding to set.

Fields

NameDescription
TextBindingPropertyDefines the TextBinding attached property. The binding will be applied to each item during text search in Avalonia.Controls.Primitives.SelectingItemsControl (such as Avalonia.Controls.ComboBox).
TextPropertyDefines the Text attached property. This text will be considered during text search in Avalonia.Controls.Primitives.SelectingItemsControl (such as Avalonia.Controls.ComboBox). This property is usually applied to an item container directly.

TextBindingProperty Field

Defines the TextBinding attached property. The binding will be applied to each item during text search in Avalonia.Controls.Primitives.SelectingItemsControl (such as Avalonia.Controls.ComboBox).

public Avalonia.AttachedProperty<Avalonia.Data.BindingBase> TextBindingProperty

TextProperty Field

Defines the Text attached property. This text will be considered during text search in Avalonia.Controls.Primitives.SelectingItemsControl (such as Avalonia.Controls.ComboBox). This property is usually applied to an item container directly.

public Avalonia.AttachedProperty<string> TextProperty