To create a new report control, do the following:
-
Choose a base class. If you cannot find a suitable control to derive from, inherit a component from the XRControl class.
-
Create the component's object model. Specify a set of properties and related attributes that determine how properties are serialized and displayed in the Property grid.
-
Create component designers for Visual Studio and the End User Designer. Designers determine the component's appearance and behavior at design time. Add attributes as necessary.
-
Choose the base class for the component's “brick” - such as the brick that the base class creates. However, if the component inherits from the XRControl class, there are two options - select VisualBrick as the brick's base class if you require a simple brick or PanelBrick if you need a container.
-
Specify how the component creates its "brick" and map the component's properties to the brick's characteristics.
-
Implement the BrickExporter class to render the "brick". Override the methods used for drawing and export.
Refer to the following document for information on XRSwissQRBill implementation: How to Create a Custom DevExpress Report Control - Swiss QR Bill Implementation.
Refer to the following document for information on XRRoundLabel and XRRoundPanel implementation: How to Create Controls with Rounded Corners.
Run the sample project to invoke the WinForms End-User Report Designer with a toolbox that contains the XRSwissQRBill, XRRoundLabel and XRRoundPanel controls.
The project is in the Examples/CustomControlExample.Win folder. File to review: Program.cs.
Run the sample project to invoke the ASP.NET Core End-User Report Designer with a toolbox that contains the XRRoundLabel, and XRRoundPanel controls.
The project is in the Examples/CustomControlExample.AspNetCore folder. Files to review: Startup.cs and Designer.cshtml.
- XRSwissQRBill.cs
- SwissQRBillCustomControl.cs
- SwissQRBillBrick.cs
- CustomControlToolBoxRegistrator.cs
- XRSwissQRBillDesignerActionList.cs
- TypeConverters.cs
- XRRoundLabel.cs
- RoundLabelBrick.cs
- RoundLabelBrickExporter.cs
- XRRoundPanel.cs
- RoundPanelBrick.cs
- RoundLabelBrickExporter.cs
- RoundedBorderPaintHelper.cs
- RoundedCustomControl.cs
- CustomControlToolBoxRegistrator.cs
- Create a Custom Numeric Label
- Create a Custom Progress Bar Control
- Add a Custom Control to the End-User Report Designer Toolbox (WPF)
- Custom Report Control in the Web End User Designer Toolbox (ASP.NET Web Forms)
- Custom Report Control in the Web End User Designer Toolbox (ASP.NET MVC)
- Custom Report Control in the Web End User Designer Toolbox in ASP.NET Core Application
(you will be redirected to DevExpress.com to submit your response)