|
1 using System; |
|
2 using System.Net; |
|
3 using System.Windows; |
|
4 using System.Windows.Controls; |
|
5 using System.Windows.Documents; |
|
6 using System.Windows.Ink; |
|
7 using System.Windows.Input; |
|
8 using System.Windows.Media; |
|
9 using System.Windows.Media.Animation; |
|
10 using System.Windows.Shapes; |
|
11 using Iri.Modernisation.BaseMVVM.Commands; |
|
12 using Iri.Modernisation.Controls.ViewModel; |
|
13 namespace Iri.Modernisation.Controls.View |
|
14 { |
|
15 public abstract partial class MenuableUserControl : UserControl |
|
16 { |
|
17 public MenuableUserControl() |
|
18 { |
|
19 MouseEnter += new MouseEventHandler(MenuableUserControl_MouseEnter); |
|
20 MouseLeave += new MouseEventHandler(MenuableUserControl_MouseLeave); |
|
21 MouseLeftButtonDown += new MouseButtonEventHandler(MenuableUserControl_MouseLeftButtonDown); |
|
22 |
|
23 MouseLeftButtonUp += new MouseButtonEventHandler(MenuableUserControl_MouseLeftButtonUp); |
|
24 } |
|
25 |
|
26 void MenuableUserControl_MouseLeave(object sender, MouseEventArgs e) |
|
27 { |
|
28 ((MenuableViewModel)base.DataContext).MenuableUserControl_MouseLeave(sender, e); |
|
29 } |
|
30 |
|
31 void MenuableUserControl_MouseEnter(object sender, MouseEventArgs e) |
|
32 { |
|
33 ((MenuableViewModel)base.DataContext).MenuableUserControl_MouseEnter(sender, e); |
|
34 |
|
35 } |
|
36 |
|
37 void MenuableUserControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) |
|
38 { |
|
39 ((MenuableViewModel)base.DataContext).MenuableUserControl_MouseLeftButtonUp(sender, e); |
|
40 } |
|
41 |
|
42 void MenuableUserControl_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) |
|
43 { |
|
44 ((MenuableViewModel)base.DataContext).MenuableUserControl_MouseLeftButtonDown(sender,e); |
|
45 } |
|
46 |
|
47 |
|
48 |
|
49 } |
|
50 } |