-
Notifications
You must be signed in to change notification settings - Fork 1
/
CustomLabel.cs
28 lines (25 loc) · 1.1 KB
/
CustomLabel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using DevExpress.Utils.Serializing;
namespace CustomReportControlSample
{
public class CustomLabel : XRLabel {
[Browsable(true), Bindable(false), Category("Data")]
[XtraSerializableProperty]
[DefaultValue("")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible),
EditorBrowsable(EditorBrowsableState.Always)]
public string CustomNumber { get; set; }
[Browsable(true), Bindable(true), Category("Data")]
[XtraSerializableProperty]
[DefaultValue("")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible),
EditorBrowsable(EditorBrowsableState.Always)]
public string StringData { get; set; }
protected override void PutStateToBrick(DevExpress.XtraPrinting.VisualBrick brick,
DevExpress.XtraPrinting.PrintingSystemBase ps) {
base.PutStateToBrick(brick, ps);
brick.Text = StringData ?? CustomNumber;
}
}
}