Back to Devexpress

RepositoryItem.Name Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-e0749fce.md

latest3.1 KB
Original Source

RepositoryItem.Name Property

Gets or sets the repository item name.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
[DefaultValue("")]
public virtual string Name { get; set; }
vb
<Browsable(False)>
<DefaultValue("")>
Public Overridable Property Name As String

Property Value

TypeDefaultDescription
StringString.Empty

A string value representing the repository item name.

|

Remarks

Since the RepositoryItem class is a Component descendant, you can access repository items in code directly by their names. Thus, you can specify an appropriate name at design time to use it when accessing editor settings via code. This eliminates the need to use EditorName. Properties constructs when accessing editor settings. This is also useful when using container controls since they operate against repository items rather than editor objects.

Note that changing the Name property at runtime has no effect.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Name property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-tokenedit-in-unbound-column/CS/Form1.cs#L35

csharp
try {
    rep.Name = "rep";
    rep.EditValueType = TokenEditValueType.List;

winforms-grid-tokenedit-in-unbound-column/VB/Form1.vb#L37

vb
Try
    rep.Name = "rep"
    rep.EditValueType = TokenEditValueType.List

See Also

RepositoryItemCollection

RepositoryItem Class

RepositoryItem Members

DevExpress.XtraEditors.Repository Namespace