问题描述:如题
问题解答:继承 CustomDrawingObject 返回自定义编辑器
关键代码:
-
- public class DateTimeDrawingObject : CustomDrawingObject
- {
- public DateTimeDrawingObject(int anchorRow, int anchorColumn)
- : base(anchorRow, anchorColumn)
- {
- this.ShowDrawingObjectOnly = true;
- }
- public override FrameworkElement RootElement
- {
- get { return new DatePicker(); }
- }
- public GcSpreadSheet Spread { get; set; }
- }
复制代码
复制代码示例下载:点击下载
|