Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/Shapes/TemplateableDraggablePoint.cs @ 12747

Last change on this file since 12747 was 12503, checked in by aballeit, 10 years ago

#2283 added GUI and charts; fixed MCTS

File size: 997 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Controls;
6using System.Windows;
7using System.Windows.Data;
8
9namespace 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.