private static void PinToStart(object sender, ListBox list) { ListBoxItem contextMenuListItem = list.ItemContainerGenerator.ContainerFromItem((sender as MenuItem).DataContext) as ListBoxItem; ROMDBEntry re = contextMenuListItem.DataContext as ROMDBEntry; try { FileHandler.CreateROMTile(re); } catch (InvalidOperationException) { MessageBox.Show(AppResources.MaximumTilesPinned); } }
private void pinBlock_Tap(object sender, System.Windows.Input.GestureEventArgs e) { if (!App.IsTrial) { try { FileHandler.CreateROMTile(this.entry); } catch (InvalidOperationException) { MessageBox.Show(AppResources.MaximumTilesPinned); } } else { ShowBuyDialog(); } }