--- a/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs Tue Sep 15 18:20:09 2009 +0200
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs Tue Sep 15 21:19:51 2009 +0200
@@ -54,7 +54,7 @@
try
{
StackPanel MItem = new StackPanel();
- Microsoft.Surface.Presentation.Controls.SurfaceButton ItemButton = new Microsoft.Surface.Presentation.Controls.SurfaceButton();
+ CustomSurfaceButton ItemButton = new CustomSurfaceButton();
ItemButton.Content = item.Name;
if (item.Items.Count > 0)
{
@@ -75,8 +75,9 @@
}
else
{
- ItemButton.ContactDown += GenerateAction;
- ItemButton.Click += GenerateAction;
+ ItemButton.Action = item.Action;
+ //ItemButton.ContactDown += GenerateAction;
+ //ItemButton.Click += GenerateAction;
MItem.Children.Add(ItemButton);
}
return MItem;
@@ -86,7 +87,10 @@
throw ex;
}
}
-
+
+ /*
+ * Déplacé dans le CustomSurfaceButton
+
private void GenerateAction(Object sender, RoutedEventArgs Event)
{
try
@@ -101,10 +105,13 @@
}
catch (Exception e) { }
}
+
+ *
+ */
private void ButtonMenu_ContactDown(object sender, RoutedEventArgs e)
{
- foreach (UIElement Child in ((Panel)((Microsoft.Surface.Presentation.Controls.SurfaceButton)sender).Parent).Children)
+ foreach (UIElement Child in ((Panel)((CustomSurfaceButton)sender).Parent).Children)
try
{
if (((StackPanel)Child).Name.Equals(((Microsoft.Surface.Presentation.Controls.SurfaceButton)sender).Content + "Panel"))