private void index_MouseDown(object sender, MouseButtonEventArgs e) { var textBlock = sender as TextBlock; var index = (byte)(int.Parse(new String(textBlock.Name.Skip(5).ToArray())) - 1); Bordmonitor.PressItem(index); }
private void ItemTapped(object sender, TappedRoutedEventArgs e) { var b = (Button)sender; var index = byte.Parse((string)b.Tag); Bordmonitor.PressItem(index); }