Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorRuntime/SvgObject.cs @ 13757

Last change on this file since 13757 was 12762, checked in by aballeit, 9 years ago

#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)

File size: 2.2 KB
Line 
1using System;
2using System.Text;
3
4using System.Windows;
5
6namespace SharpVectors.Runtime
7{
8    public sealed class SvgObject : DependencyObject
9    {
10        #region Public Fields
11
12        public const string LinksLayer = "AnimationLayer";
13        public const string DrawLayer  = "DrawingLayer";
14
15        public static readonly DependencyProperty IdProperty =
16            DependencyProperty.RegisterAttached("Id", typeof(string), typeof(SvgObject),
17            new FrameworkPropertyMetadata(String.Empty, FrameworkPropertyMetadataOptions.None));
18
19        public static readonly DependencyProperty TypeProperty =
20            DependencyProperty.RegisterAttached("Type", typeof(SvgObjectType), typeof(SvgObject),
21            new FrameworkPropertyMetadata(SvgObjectType.None, FrameworkPropertyMetadataOptions.None));
22
23        public static readonly DependencyProperty TitleProperty =
24            DependencyProperty.RegisterAttached("Title", typeof(String), typeof(SvgObject),
25            new FrameworkPropertyMetadata(String.Empty, FrameworkPropertyMetadataOptions.None));
26
27        #endregion
28
29        #region Constructors and Destructor
30
31        public SvgObject()
32        {
33        }
34
35        #endregion
36
37        #region Public Methods
38
39        public static void SetId(DependencyObject element, string value)
40        {
41            element.SetValue(IdProperty, value);
42        }
43
44        public static string GetId(DependencyObject element)
45        {
46            return (string)element.GetValue(IdProperty);
47        }
48
49        public static void SetType(DependencyObject element, SvgObjectType value)
50        {
51            element.SetValue(TypeProperty, value);
52        }
53
54        public static SvgObjectType GetType(DependencyObject element)
55        {
56            return (SvgObjectType)element.GetValue(TypeProperty);
57        }
58
59        public static void SetTitle(DependencyObject element, string value)
60        {
61            element.SetValue(TitleProperty, value);
62        }
63
64        public static string GetTitle(DependencyObject element)
65        {
66            return (string)element.GetValue(TitleProperty);
67        }
68
69        #endregion
70    }
71}
Note: See TracBrowser for help on using the repository browser.