equal
deleted
inserted
replaced
|
1 using System; |
|
2 using System.Collections.Generic; |
|
3 using System.Linq; |
|
4 using System.Net; |
|
5 using System.Windows; |
|
6 using System.Windows.Controls; |
|
7 using System.Windows.Documents; |
|
8 using System.Windows.Input; |
|
9 using System.Windows.Media; |
|
10 using System.Windows.Media.Animation; |
|
11 using System.Windows.Shapes; |
|
12 using Iri.Modernisation.Data.Models; |
|
13 using Iri.Modernisation.BaseMVVM.Commands; |
|
14 using Iri.Modernisation.Controls.ViewModel; |
|
15 namespace Iri.Modernisation.Controls.View |
|
16 { |
|
17 public partial class ClickMenuLayer: UserControl |
|
18 { |
|
19 public ClickMenuLayer() |
|
20 { |
|
21 Commands.Initialize(); |
|
22 InitializeComponent(); |
|
23 ClickMenu.DataContext = new ClickMenuVM(); |
|
24 Commands.PolemicElement.ElementSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(MenuClick_Executed); |
|
25 |
|
26 |
|
27 } |
|
28 |
|
29 void MenuClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
30 { |
|
31 |
|
32 this.ClickMenu.Margin = new Thickness( |
|
33 ((MouseButtonEventArgs) e.Parameter).GetPosition(this).X - 40, |
|
34 ((MouseButtonEventArgs) e.Parameter).GetPosition(this).Y - 40, |
|
35 ClickMenu.Margin.Right, |
|
36 ClickMenu.Margin.Bottom); |
|
37 } |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 } |
|
45 } |