|
0
|
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 |
{ |
|
17
|
31 |
Point p = ((MouseButtonEventArgs)e.Parameter).GetPosition(Application.Current.RootVisual); |
|
|
32 |
|
|
0
|
33 |
this.ClickMenu.Margin = new Thickness( |
|
17
|
34 |
((MouseButtonEventArgs) e.Parameter).GetPosition(Application.Current.RootVisual).X - 40, |
|
|
35 |
((MouseButtonEventArgs) e.Parameter).GetPosition(Application.Current.RootVisual).Y - 40, |
|
0
|
36 |
ClickMenu.Margin.Right, |
|
17
|
37 |
ClickMenu.Margin.Bottom); |
|
0
|
38 |
} |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
} |
|
|
46 |
} |