public RelearnMoveWindow(IPokemon pokemon) { InitializeComponent(); this.pokemon = pokemon; ushort[] moves = PokemonDatabase.GetRelearnableMoves(pokemon); foreach (ushort moveID in moves) { Move move = new Move(moveID); ListViewItem listViewItem = new ListViewItem(); Grid grid = new Grid(); grid.Width = 321; grid.Height = 27; Rectangle panel = new Rectangle(); panel.Margin = new Thickness(1, 1, 0, 0); panel.Width = 319; panel.Height = 23; panel.RadiusX = 2; panel.RadiusY = 2; panel.Fill = new SolidColorBrush(Color.FromRgb(248, 248, 248)); panel.Stroke = new SolidColorBrush(Color.FromRgb(0, 0, 0)); panel.StrokeThickness = 1; PokemonTypeControl type = new PokemonTypeControl(); type.Type = move.MoveData.Type; type.Margin = new Thickness(10, 4, 0, 0); ConditionTypeControl condition = new ConditionTypeControl(); condition.Type = move.MoveData.ConditionType; condition.Margin = new Thickness(10, 4, 0, 0); condition.Visibility = Visibility.Hidden; Label name = new Label(); name.Content = move.MoveData.Name; name.Margin = new Thickness(120, 0, 0, 0); name.FontWeight = FontWeights.Bold; Label pp = new Label(); pp.Content = (move.MoveData.PP == 0 ? "--" : move.TotalPP.ToString()); pp.Margin = new Thickness(281, 0, 0, 0); pp.FontWeight = FontWeights.Bold; grid.Children.Add(panel); grid.Children.Add(type); grid.Children.Add(condition); grid.Children.Add(name); grid.Children.Add(pp); listViewItem.Content = grid; listViewItem.Tag = move; listViewMoves.Items.Add(listViewItem); } this.labelMoveAccuracy.Content = ""; this.labelMovePower.Content = ""; this.labelMoveCategory.Content = ""; this.labelMoveAppeal.Content = ""; this.labelMoveJam.Content = ""; this.textBlockMoveDescription.Text = ""; buttonOpenMoveInBulbapedia.Visibility = Visibility.Hidden; }