Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows.Controls;
|
---|
6 | using System.Windows;
|
---|
7 | using System.Windows.Data;
|
---|
8 |
|
---|
9 | namespace Microsoft.Research.DynamicDataDisplay.Charts.Shapes
|
---|
10 | {
|
---|
11 | public class TemplateableDraggablePoint : DraggablePoint
|
---|
12 | {
|
---|
13 | private readonly Control marker = new Control { Focusable = false };
|
---|
14 | public TemplateableDraggablePoint()
|
---|
15 | {
|
---|
16 | marker.SetBinding(Control.TemplateProperty, new Binding { Source = this, Path = new PropertyPath("MarkerTemplate") });
|
---|
17 | Content = marker;
|
---|
18 | }
|
---|
19 |
|
---|
20 | public ControlTemplate MarkerTemplate
|
---|
21 | {
|
---|
22 | get { return (ControlTemplate)GetValue(MarkerTemplateProperty); }
|
---|
23 | set { SetValue(MarkerTemplateProperty, value); }
|
---|
24 | }
|
---|
25 |
|
---|
26 | public static readonly DependencyProperty MarkerTemplateProperty = DependencyProperty.Register(
|
---|
27 | "MarkerTemplate",
|
---|
28 | typeof(ControlTemplate),
|
---|
29 | typeof(TemplateableDraggablePoint),
|
---|
30 | new FrameworkPropertyMetadata(null));
|
---|
31 |
|
---|
32 | }
|
---|
33 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.