Rev | Line | |
---|
[12503] | 1 | using System;
|
---|
| 2 | using System.Windows;
|
---|
| 3 | using System.Windows.Media;
|
---|
| 4 |
|
---|
| 5 | namespace Microsoft.Research.DynamicDataDisplay.PointMarkers
|
---|
| 6 | {
|
---|
| 7 | /// <summary>Invokes specified delegate for rendering custon marker
|
---|
| 8 | /// at every point of graph</summary>
|
---|
| 9 | public sealed class DelegatePointMarker : PointMarker {
|
---|
| 10 | public MarkerRenderHandler RenderCallback { get; set; }
|
---|
| 11 |
|
---|
| 12 | public DelegatePointMarker() { }
|
---|
| 13 | public DelegatePointMarker(MarkerRenderHandler renderCallback) {
|
---|
| 14 | if (renderCallback == null)
|
---|
| 15 | throw new ArgumentNullException("renderCallback");
|
---|
| 16 |
|
---|
| 17 | RenderCallback = renderCallback;
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | public override void Render(DrawingContext dc, Point screenPoint) {
|
---|
| 21 | RenderCallback(dc, screenPoint);
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.