Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/Avalonia.Controls/Primitives/TextSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static readonly AttachedProperty<string?> TextProperty
/// The binding will be applied to each item during text search in <see cref="SelectingItemsControl"/> (such as <see cref="ComboBox"/>).
/// </summary>
public static readonly AttachedProperty<BindingBase?> TextBindingProperty
= AvaloniaProperty.RegisterAttached<Interactive, BindingBase?>("TextBinding", typeof(TextSearch));
= AvaloniaProperty.RegisterAttached<AvaloniaObject, BindingBase?>("TextBinding", typeof(TextSearch));

Comment thread
MrJul marked this conversation as resolved.
/// <summary>
/// Sets the value of the <see cref="TextProperty"/> attached property to a given <see cref="Control"/>.
Expand All @@ -41,21 +41,21 @@ public static void SetText(Interactive control, string? text)
=> control.GetValue(TextProperty);

/// <summary>
/// Sets the value of the <see cref="TextBindingProperty"/> attached property to a given <see cref="Interactive"/>.
/// Sets the value of the <see cref="TextBindingProperty"/> attached property to a given element.
/// </summary>
/// <param name="interactive">The interactive element.</param>
/// <param name="element">The element.</param>
/// <param name="value">The search text binding to set.</param>
public static void SetTextBinding(Interactive interactive, BindingBase? value)
=> interactive.SetValue(TextBindingProperty, value);
public static void SetTextBinding(AvaloniaObject element, BindingBase? value)
=> element.SetValue(TextBindingProperty, value);
Comment thread
MrJul marked this conversation as resolved.

/// <summary>
/// Gets the value of the <see cref="TextBindingProperty"/> attached property from a given <see cref="Interactive"/>.
/// Gets the value of the <see cref="TextBindingProperty"/> attached property from a given element.
/// </summary>
/// <param name="interactive">The interactive element.</param>
/// <param name="element">The element.</param>
/// <returns>The search text binding.</returns>
[AssignBinding]
public static BindingBase? GetTextBinding(Interactive interactive)
=> interactive.GetValue(TextBindingProperty);
public static BindingBase? GetTextBinding(AvaloniaObject element)
=> element.GetValue(TextBindingProperty);

/// <summary>
/// <para>Gets the effective text of a given item.</para>
Expand Down
Loading