New to Telerik UI for WinFormsStart a free 30-day trial

Represents a name selector. Name selectors are used to apply customization to the element having the specified name. This behavior is very similar to that of CSS id selectors.

Definition

Constructors

Initializes a new instance of the NameSelector class.

C#
public NameSelector()

Initializes a new instance of the NameSelector class using the name of the element.

C#
public NameSelector(string elementName)
Parameters:elementNamestring

Properties

C#
protected override bool CanUseCache { get; }

Overrides: HierarchicalSelector.CanUseCache

Gets or sets the element's name. Customization is applied only to the element having this name.

C#
public string ElementName { get; set; }

Methods

C#
protected override bool CanSelectOverride(RadObject element)
Parameters:elementRadObjectReturns:

bool

Overrides: SelectorBase.CanSelectOverride(RadObject)

Gets value indicating whether the selector Equals to the specified selector

C#
public override bool Equals(IElementSelector elementSelector)
Parameters:elementSelectorIElementSelectorReturns:

bool

Overrides: SelectorBase.Equals(IElementSelector)

C#
protected override int GetKey()
Returns:

int

Overrides: SelectorBase.GetKey()

C#
public static int GetSelectorKey(string name)
Parameters:namestringReturns:

int

C#
public override string ToString()
Returns:

string

Overrides: object.ToString()