New to Telerik UI for WinForms? Start a free 30-day trial

Compares a supplied node's text with a non-empty string argument and returns the node when they match.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class FindByTextCommand : CommandBase, IImageListProvider

Inheritance: objectCommandBaseFindByTextCommand

Implements: IImageListProvider

Constructors

C#
public FindByTextCommand()

Methods

Determines whether the command can compare a tree node.

C#
public override bool CanExecute(object parameter)
Parameters:parameterobject

The candidate node.

Returns:

bool

true for a RadTreeNode; otherwise, the base command result.

Overrides: CommandBase.CanExecute(object)

Executes an exact comparison against the supplied node when the search text is non-empty.

C#
public override object Execute(params object[] settings)
Parameters:settingsobject[]

The first setting is the node; the second is an IList whose first item is the text to match.

Returns:

object

The supplied node when its text matches the non-empty search text, or null otherwise.

Exceptions: ArgumentException

The first setting can execute, but the supplied second setting is not a non-empty IList whose first item is a string.

Overrides: CommandBase.Execute(params object[])