|
0
|
1 |
using System; |
|
|
2 |
using System.Windows; |
|
|
3 |
using System.Windows.Controls; |
|
|
4 |
using System.Windows.Documents; |
|
|
5 |
using System.Windows.Ink; |
|
|
6 |
using System.Windows.Input; |
|
|
7 |
using System.Windows.Media; |
|
|
8 |
using System.Windows.Media.Animation; |
|
|
9 |
using System.Windows.Shapes; |
|
|
10 |
using Iri.Modernisation.Data.Models; |
|
|
11 |
using System.Windows.Data; |
|
|
12 |
using Iri.Modernisation.BaseMVVM.Commands; |
|
|
13 |
using Iri.Modernisation.Controls.Converter; |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
namespace Iri.Modernisation.Controls.View |
|
|
18 |
{ |
|
|
19 |
public partial class ContextualLinkBinder : UserControl |
|
|
20 |
{ |
|
|
21 |
|
|
|
22 |
public PolemicElementType PolemicType |
|
|
23 |
{ |
|
|
24 |
get { return (PolemicElementType)GetValue(_polemicType); } |
|
|
25 |
set |
|
|
26 |
{ |
|
|
27 |
|
|
|
28 |
SetValue(_polemicType, value); |
|
|
29 |
PolemicTypeColorConverter converter = new PolemicTypeColorConverter(); |
|
|
30 |
path9020.Stroke = PolemicTypeColorConverter.Convert(value); |
|
|
31 |
|
|
|
32 |
} |
|
|
33 |
} |
|
|
34 |
|
|
|
35 |
public static readonly DependencyProperty _polemicType = |
|
|
36 |
DependencyProperty.Register("PolemicType", typeof(PolemicElementType), typeof(ContextualLinkBinder), new PropertyMetadata(PolemicElementType.Basic)); |
|
|
37 |
|
|
|
38 |
/* public Brush ArrowColor |
|
|
39 |
{ |
|
|
40 |
get { return path9020.Stroke; } |
|
|
41 |
set { path9020.Stroke = value; } |
|
|
42 |
}*/ |
|
|
43 |
public ContextualLinkBinder() |
|
|
44 |
{ |
|
|
45 |
// Required to initialize variables |
|
|
46 |
InitializeComponent(); |
|
|
47 |
MouseLeftButtonDown += Commands.ContextualBinderLayer.BeginBind.Execute; |
|
13
|
48 |
MouseLeftButtonUp += new MouseButtonEventHandler(ContextualLinkBinder_MouseLeftButtonUp); |
|
|
49 |
|
|
0
|
50 |
|
|
|
51 |
|
|
|
52 |
} |
|
13
|
53 |
|
|
|
54 |
void ContextualLinkBinder_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) |
|
|
55 |
{ |
|
|
56 |
Commands.ContextualBinderLayer.BeginBind.Execute(sender, null); |
|
|
57 |
} |
|
0
|
58 |
public ContextualLinkBinder(ContextualLinkBinder copy) |
|
|
59 |
{ |
|
|
60 |
InitializeComponent(); |
|
|
61 |
PolemicType = copy.PolemicType; |
|
|
62 |
} |
|
|
63 |
} |
|
|
64 |
|
|
|
65 |
} |