equal
deleted
inserted
replaced
31 |
31 |
32 public SurfaceWindow1() |
32 public SurfaceWindow1() |
33 { |
33 { |
34 InitializeComponent(); |
34 InitializeComponent(); |
35 |
35 |
|
36 //Permet d'initialiser les quand Grid à la position initiale du pivot |
|
37 InitGridPositions(); |
36 // Add handlers for Application activation events |
38 // Add handlers for Application activation events |
37 AddActivationHandlers(); |
39 AddActivationHandlers(); |
|
40 } |
|
41 |
|
42 private void InitGridPositions() |
|
43 { |
|
44 //Initialise les 4 Grids à la positions initiale du Pivot. |
|
45 try |
|
46 { |
|
47 ScatterViewItem item = (ScatterViewItem)ScaterView.Items.GetItemAt(0); |
|
48 Grid1.Width =item.Center.X; |
|
49 Grid1.Height = item.Center.Y; |
|
50 |
|
51 Grid2.Width = item.Center.X; |
|
52 Grid2.Height = 768 - item.Center.Y; |
|
53 |
|
54 Grid3.Width = 1024 - item.Center.X; |
|
55 Grid3.Height = 768 - item.Center.Y; |
|
56 |
|
57 Grid4.Width = 1024 - item.Center.X; |
|
58 Grid4.Height = item.Center.Y; |
|
59 } |
|
60 catch (Exception ex) { } |
38 } |
61 } |
39 |
62 |
40 |
63 |
41 /// <summary> |
64 /// <summary> |
42 /// Occurs when the window is about to close. |
65 /// Occurs when the window is about to close. |
104 //TODO: disable audio, animations here |
127 //TODO: disable audio, animations here |
105 } |
128 } |
106 |
129 |
107 private void ScaterView_ContactChanged(object sender, ContactEventArgs e) |
130 private void ScaterView_ContactChanged(object sender, ContactEventArgs e) |
108 { |
131 { |
|
132 //Permet la MAJ des 4 Grids à la position du pivot |
109 try |
133 try |
110 { |
134 { |
111 Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
135 Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
112 Grid1.Height = e.GetPosition(mainSurfaceWindow).Y; |
136 Grid1.Height = e.GetPosition(mainSurfaceWindow).Y; |
113 |
137 |