Back to Devexpress

XRControl.WidthF Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrcontrol-efb64837.md

latest6.1 KB
Original Source

XRControl.WidthF Property

Specifies the control’s width (measured in report units).

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[Browsable(false)]
public virtual float WidthF { get; set; }
vb
<Browsable(False)>
Public Overridable Property WidthF As Single

Property Value

TypeDescription
Single

A Single value representing the width of the control. This value cannot be less than 2 units.

|

Remarks

A control’s width and height are measured in the units set by the XtraReport.ReportUnit property.

A control’s height is specified via the XRControl.HeightF property.

Note

Neither the XRControl.HeightF nor the WidthF property can be set to a value that is less than 2 units.

The following code snippets (auto-collected from DevExpress Examples) contain references to the WidthF 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-create-a-custom-exporter-for-pivotgridcontrol-with-xtrareport/CS/Report_at_Runtime/PivotReportGenerator.cs#L161

csharp
processedPage++;
tableHeader.WidthF = usablePageWidth - remainingSpace;
tableDetail.WidthF = usablePageWidth - remainingSpace;

winforms-dashboard-add-custom-information-to-the-exported-dashboard/CS/WinViewer_CustomExport/Form1.cs#L19

csharp
icon.HeightF = 50;
icon.WidthF = 300;

web-forms-dashboard-add-custom-information-to-exported-dashboard/CS/WebDashboard_CustomExport/Default.aspx.cs#L44

csharp
icon.HeightF = 50;
icon.WidthF = 300;
headerBand.Controls.Add(icon);

reporting-wpf-create-report-in-code/CS/RuntimeReportsApplication/MainWindow.xaml.cs#L77

csharp
label.Text = caption;
label.WidthF = 300F;

reporting-winforms-sql-data-source-runtime/CS/RuntimeSqlDataSourceReportSample/ReportCreator.cs#L43

csharp
label.Text = caption;
label.WidthF = 300F;

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

vb
processedPage += 1
tableHeader.WidthF = usablePageWidth - remainingSpace
tableDetail.WidthF = usablePageWidth - remainingSpace

winforms-dashboard-add-custom-information-to-the-exported-dashboard/VB/WinViewer_CustomExport/Form1.vb#L18

vb
picture.HeightF = 50
picture.WidthF = 300

web-forms-dashboard-add-custom-information-to-exported-dashboard/VB/WebDashboard_CustomExport/Default.aspx.vb#L43

vb
icon.HeightF = 50
icon.WidthF = 300
headerBand.Controls.Add(icon)

reporting-wpf-create-report-in-code/VB/RuntimeReportsApplication/MainWindow.xaml.vb#L86

vb
label.Text = caption
label.WidthF = 300.0F

reporting-winforms-sql-data-source-runtime/VB/RuntimeSqlDataSourceReportSample/ReportCreator.vb#L40

vb
label.Text = caption
label.WidthF = 300F

See Also

HeightF

XRControl Class

XRControl Members

DevExpress.XtraReports.UI Namespace