12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System.ComponentModel;
- using System.ComponentModel.Design;
- using System.Drawing.Design;
- using CustomControls.Pattern;
- using DevExpress.XtraReports.Design;
- using DevExpress.XtraReports.Design.Expressions;
- namespace CustomControls.Design
- {
- /// <summary>
- /// 设计清单
- /// </summary>
- public class XRPatternDesignerActionList : XRControlBaseDesignerActionList
- {
- /// <summary>
- /// 实例
- /// </summary>
- public string StringData
- {
- get => ((XRPattern)Component).StringData;
- set => SetPropertyValue(nameof(XRPattern.StringData), value);
- }
- /// <summary>
- /// 绑定表达式
- /// </summary>
- [Editor(typeof(ExpressionValueEditor), baseType: typeof(UITypeEditor))]
- [TypeConverter(typeof(ExpressionPropertyTypeConverter))]
- public string StringDataExpression
- {
- get => GetExpression(nameof(XRPattern.StringData));
- set => SetExpression(nameof(XRPattern.StringData), value);
- }
- /// <summary>
- /// 构造函数
- /// </summary>
- public XRPatternDesignerActionList(XRControlDesigner designer) : base(designer)
- {
- }
- /// <summary>
- /// 添加设计属性
- /// </summary>
- protected override void FillActionItemCollection(DesignerActionItemCollection actionItems)
- {
- AddPropertyItem(actionItems, nameof(StringData), nameof(XRPattern.StringData));
- if (TryCreatePropertyItem(nameof(StringDataExpression), string.Empty, out var item))
- {
- actionItems.Add(item);
- }
- }
- }
- }
|