The requested page is not available for the requested platform. You are viewing the content for Default platform.

WinControlContainer.WinControl Property

Gets or sets a Control object that is placed into the WinControlContainer object.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

Declaration

[Browsable(false)]
[DefaultValue(null)]
public virtual Control WinControl { get; set; }
<Browsable(False)>
<DefaultValue(Nothing)>
Public Overridable Property WinControl As Control

Property Value

Type Default Description
Control

null

A Control class descendant.

Remarks

To learn more on embedding Windows Forms controls into reports, refer to the Using Third-Party Controls document.

The following method creates a WinControlContainer object and sets some of its properties. A GroupBox object is then wrapped in it.

using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraReports.UI;
// ...

public WinControlContainer CreateWinControl() {
   // Create a GroupBox object.
   GroupBox groupBox = new GroupBox();

   // Set its text.
   groupBox.Text = "Windows.Forms Group Box";

   // Create a WinControlContainer object.
   WinControlContainer winContainer = new WinControlContainer();

   // Set its location and size.
   winContainer.LocationF = new PointF(250F, 40F);
   winContainer.SizeF = new SizeF(200F, 100F);

   // Set the groupBox as a wrapped object.
   winContainer.WinControl = groupBox;

   return winContainer;
}
See Also