Back to Devexpress

XRControlStyle.Name Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrcontrolstyle-c9527f51.md

latest4.0 KB
Original Source

XRControlStyle.Name Property

Gets or sets the control style name.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

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

Property Value

TypeDefaultDescription
StringString.Empty

A String that specifies the style name.

|

Remarks

You can use the Name property at runtime to evaluate an object by its name rather than type or programmatic name. The Name property returns a String value and can be evaluated in case-style logic statements ( switch statement in C#, Select statement in Visual Basic).

Note

To avoid invalid report serialization, the Name property value should not contain any reserved .NET words, library names or the XtraReport class’s property names ( DataSource , Version , etc.)

Refer to Use Report Parameters for more information.

The following code snippets (auto-collected from DevExpress Examples) contain references 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.

reporting-winforms-create-report-dynamically-and-bind-it-to-dataset/CS/Form1.cs#L85

csharp
oddStyle.StyleUsing.UseBorders = false;
oddStyle.Name = "OddStyle";

winforms-create-a-custom-exporter-for-pivotgridcontrol-with-xtrareport/CS/Report_at_Runtime/PivotReportGenerator.cs#L120

csharp
oddStyle.StyleUsing.UseBorders = false;
oddStyle.Name = "OddStyle";

reporting-winforms-create-report-dynamically-and-bind-it-to-dataset/VB/Form1.vb#L79

vb
oddStyle.StyleUsing.UseBorders = False
oddStyle.Name = "OddStyle"

winforms-create-a-custom-exporter-for-pivotgridcontrol-with-xtrareport/VB/Report_at_Runtime/PivotReportGenerator.vb#L123

vb
oddStyle.StyleUsing.UseBorders = False
oddStyle.Name = "OddStyle"
' Specify the even style appearance

See Also

XRControlStyle Class

XRControlStyle Members

DevExpress.XtraReports.UI Namespace