private void mnuPin_Click(object sender, RoutedEventArgs e) { var item = (MenuItem)sender; var database = (DatabaseInfo)item.Tag; if (TilesManager.Pin(database)) { return; } MessageBox.Show( Properties.Resources.AlreadyPinned, Properties.Resources.PinDatabase, MessageBoxButton.OK); }