IAnnotation
定义一个注释的界面, 定义一个自定义可绘制元素 。 @% UltrachartSurface\%%%% 下
实现: IHitTestable, IPublishMouseEvents, IXmlSerializable
属性
public object DataContext { get; set; }
value = iAnnotation.DataContext
iAnnotation.DataContext = value
获取或设置数据上下文
public XyDirection DragDirections { get; set; }
value = iAnnotation.DragDirections
iAnnotation.DragDirections = value
使用鼠标拖动注释时限制拖放方向, X 方向、 Y 方向或 XyDirection 方向。 请参见 XyDirection 选项
public bool IsAttached { get; set; }
value = iAnnotation.IsAttached
iAnnotation.IsAttached = value
获取或设定当前注释是否附加
public bool IsEditable { get; set; }
value = iAnnotation.IsEditable
iAnnotation.IsEditable = value
获取或设定您是否可以交互当前注释
public bool IsHidden { get; set; }
value = iAnnotation.IsHidden
iAnnotation.IsHidden = value
获取或设置值, 表示当前注释是否被隐藏调用所隐藏
public bool IsSelected { get; set; }
value = iAnnotation.IsSelected
iAnnotation.IsSelected = value
获取或设定当前注释是否被选中
public IUltrachartSurface ParentSurface { get; set; }
value = iAnnotation.ParentSurface
iAnnotation.ParentSurface = value
获取或设定此注释属于% IUltrachartSurface {} 。
public XyDirection ResizeDirections { get; set; }
value = iAnnotation.ResizeDirections
iAnnotation.ResizeDirections = value
在使用鼠标重排注时限制重排大小方向, e.g 在 X-方向, Y-方向或 XyDirection 中。 请参见 XyDirection 选项
public IServiceContainer Services { get; set; }
value = iAnnotation.Services
iAnnotation.Services = value
获得或设置一个 IServiceContainer 容器
public IComparable X1 { get; set; }
value = iAnnotation.X1
iAnnotation.X1 = value
获取或设置注释的 X1 坐标。 对于绝对值, 这必须是 X 轴上的数据值, 如 X DateTime + , 双倍值 , 或 x NumericAxis + 的整数指数 。 对于相对值, 这必须是 0.0 和 1.0 之间的双值, 其中 0.0 是 XAx 的左侧, 1.0 是 极右 。
public IComparable X2 { get; set; }
value = iAnnotation.X2
iAnnotation.X2 = value
获取或设置注释的 X2 坐标。 对于绝对值, 这必须是 X 轴上的数据值, 如 X DateTime+++++ DateTimeAxis++, 双倍的 X NumericAxis+++ 或整数指数 Q CategoryDateTimeAxis+++。 对于相对值, 这必须是 0.0 和 1.0 之间的双值, 其中 0.0 是 XAxis 的左侧, 而 1.0 是 的极右值 。
public IEnumerable<IAxis> XAxes { get; }
value = iAnnotation.XAxes
返回父 UltrachartSurface 上的 XAxs
public IAxis XAxis { get; }
value = iAnnotation.XAxis
获取父的 XAxis IAxis 实例 {}\\ UltrachartSurface}
public string XAxisId { get; set; }
value = iAnnotation.XAxisId
iAnnotation.XAxisId = value
获取或设置 XAxis 参数,以衡量此注释。见 Id
public IComparable Y1 { get; set; }
value = iAnnotation.Y1
iAnnotation.Y1 = value
获取或设置注解的 Y1 坐标。 对于绝对值, 这必须是 Y 轴上的数据值, 如 NumericAxis 的双相值 。 这必须是 0.0 和 1.0 之间的双相值, 其中 0.0 为 YA 轴下方, 1.0 为上方
public IComparable Y2 { get; set; }
value = iAnnotation.Y2
iAnnotation.Y2 = value
获取或设置注释的 Y2 坐标。 对于绝对值, 这必须是 Y 轴上的数据值, 如 NumericAxis 的双倍值 相对值, 这必须是 0.0 到 1.0 之间的双倍值, 其中 0.0 是 YA 轴的下方, 1.0 是上方 。
public IEnumerable<IAxis> YAxes { get; }
value = iAnnotation.YAxes
返回父 UltrachartSurface 上的 YAX
public string YAxisId { get; set; }
value = iAnnotation.YAxisId
iAnnotation.YAxisId = value
获取或设定 YAAxis ID , 以该注释作为对照。 见 ID
方法
public bool CanMultiSelect(IAnnotation[] annotations)
result = iAnnotation.CanMultiSelect(annotations)
请检查此注释是否可与其他注释一起多选取 。
- annotations
- 对照说明.
public void Drag(double hOffset, double vOffset)
iAnnotation.Drag(hOffset, vOffset)
提高 & #% DragDelta\%%% 事件, 当拖动操作正在进行时, 并在注释中每次更新 X1 Y1 X2 Y2 点时, 都会调用
public void EndDrag()
iAnnotation.EndDrag()
提升 & #% DragEnded\%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
public Point[] GetBasePoints()
result = iAnnotation.GetBasePoints()
这种方法被 AnnotationResizeAdorner 内部使用。 获取调高点位置
public void Hide()
iAnnotation.Hide()
隐藏注释, 方法是从 ParentSurface AdornerLayerCanvas 中去除一个涂鸦标记, 并设置可视度以折叠
public void MoveAnnotation(double offsetX, double offsetY)
iAnnotation.MoveAnnotation(offsetX, offsetY)
这种方法由 AnnotationDragAdorner 内部使用。程序上将注释以 X,Y 相冲移 。
- offsetX
- offsetY
public void OnXAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
iAnnotation.OnXAxesCollectionChanged(sender, args)
当父 XAxes 更改时会提高通知.
public void OnYAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
iAnnotation.OnYAxesCollectionChanged(sender, args)
当母 YAxes 更改时会提高通知。
public bool Refresh()
result = iAnnotation.Refresh()
刷新母 UltrachartSurface 上的注释位置, 而不导致图表的完全重绘
public void SetBasePoint(Point newPoint, int index)
iAnnotation.SetBasePoint(newPoint, index)
AnnotationResizeAdorner内部使用这种方法。程序上设置了调色点位置
- newPoint
- index
public void StartDrag(bool isPrimary)
iAnnotation.StartDrag(isPrimary)
启动拖动操作时, 将 DragStarted 事件调用
public void Update(ICoordinateCalculator<double> xCoordinateCalculator, ICoordinateCalculator<double> yCoordinateCalculator)
iAnnotation.Update(xCoordinateCalculator, yCoordinateCalculator)
更新坐标计算器,并刷新母机UltrachartSurface上的注释位置
- xCoordinateCalculator
- 轴心国 ICoordinateCalculator
- yCoordinateCalculator
- The YAxis ICoordinateCalculator
事件
public event EventHandler<AnnotationDragDeltaEventArgs> DragDelta
iAnnotation.DragDelta += handler
拖动或移动当前 AnnotationBase 时的外观
public event EventHandler<AnnotationDragEventArgs> DragEnded
iAnnotation.DragEnded += handler
拖放或移动操作结束时的意外
public event EventHandler<AnnotationDragEventArgs> DragStarted
iAnnotation.DragStarted += handler
拖放或移动操作开始时的外观
public event EventHandler Unselected
iAnnotation.Unselected += handler
当注释变成未选中时, 会出现什么情况 。