|
1 using System; |
|
2 using System.IO; |
|
3 using System.Net; |
|
4 using System.Windows; |
|
5 using System.Windows.Controls; |
|
6 using System.Windows.Data; |
|
7 using System.Windows.Media; |
|
8 using System.Windows.Media.Animation; |
|
9 using System.Windows.Navigation; |
|
10 |
|
11 namespace FingersDance.Control.Screen |
|
12 { |
|
13 public partial class UserControlScreen |
|
14 { |
|
15 public UserControlScreen() |
|
16 { |
|
17 this.InitializeComponent(); |
|
18 |
|
19 // Insert code required on object creation below this point. |
|
20 } |
|
21 |
|
22 |
|
23 private void ScatterViewPivot_ContactChanged(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
24 { |
|
25 try |
|
26 { |
|
27 |
|
28 //myrect.Width = e.GetPosition(my_surfaceWindow).X; |
|
29 //myrect.Height = e.GetPosition(my_surfaceWindow).Y; |
|
30 |
|
31 Grid1.Width = e.GetPosition(UserControl).X; |
|
32 Grid1.Height = e.GetPosition(UserControl).Y; |
|
33 |
|
34 //Grid2.Width = 1024 - e.GetPosition(UserControl).X; |
|
35 //Grid2.Height = 768 - e.GetPosition(UserControl).Y; |
|
36 |
|
37 //Grid3.Width = e.GetPosition(UserControl).X; |
|
38 //Grid3.Height = 768 - e.GetPosition(UserControl).Y; |
|
39 |
|
40 //Grid4.Width = 1024 - e.GetPosition(UserControl).X; |
|
41 //Grid4.Height = e.GetPosition(UserControl).Y; |
|
42 |
|
43 } |
|
44 catch (Exception ex) { } |
|
45 } |
|
46 |
|
47 private void ScatterViewItemPivot_ContactChanged(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
48 { |
|
49 try |
|
50 { |
|
51 |
|
52 Grid1.Width = e.GetPosition(UserControl).X; |
|
53 Grid1.Height = e.GetPosition(UserControl).Y; |
|
54 |
|
55 Grid2.Width = 1024- e.GetPosition(UserControl).X; |
|
56 Grid2.Height = e.GetPosition(UserControl).Y; |
|
57 |
|
58 Grid3.Width = e.GetPosition(UserControl).X; |
|
59 Grid3.Height = 768 - e.GetPosition(UserControl).Y; |
|
60 |
|
61 Grid4.Width = 1024 - e.GetPosition(UserControl).X; |
|
62 Grid4.Height = 768 - e.GetPosition(UserControl).Y; |
|
63 |
|
64 } |
|
65 catch (Exception ex) { } |
|
66 } |
|
67 } |
|
68 } |