Skip to content
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #598 from advancedrei/master
Browse files Browse the repository at this point in the history
Fix InventoryPage Containers
  • Loading branch information
ST-Apps authored Aug 11, 2016
2 parents 30cebdb + acb4ffb commit a70f6f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PokemonGo-UWP/ViewModels/PokemonInventoryPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private static IEnumerable<PokemonDataWrapper> GetSortedPokemonCollection(
case PokemonSortingModes.Health:
return pokemonInventory.OrderByDescending(pokemon => pokemon.Stamina);
case PokemonSortingModes.Name:
return pokemonInventory.OrderBy(pokemon => Utils.Resources.Pokemon.GetString(pokemon.PokemonId.ToString()));
return pokemonInventory.OrderBy(pokemon => Utils.Resources.Pokemon.GetString(pokemon.PokemonId.ToString())).ThenByDescending(pokemon => pokemon.Cp);
case PokemonSortingModes.Combat:
return pokemonInventory.OrderByDescending(pokemon => pokemon.Cp);
default:
Expand Down
17 changes: 12 additions & 5 deletions PokemonGo-UWP/Views/PokemonInventoryPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,21 +316,23 @@
<RelativePanel>
<GridView
ItemsSource="{Binding PokemonInventory}"
SelectionMode="None">
SelectionMode="None"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignBottomWithPanel="True">

<GridView.ItemsPanel>
<ItemsPanelTemplate>
<WrapGrid Orientation="Horizontal"
VerticalChildrenAlignment="Top"
HorizontalAlignment="Center"
MaximumRowsOrColumns="4" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>

<GridView.ItemTemplate>
<DataTemplate>
<StackPanel Margin="8,4,8,4"
Width="92">
<StackPanel Margin="8,4,8,4">
<TextBlock TextAlignment="Center">
<Run FontSize="12"
x:Uid="CpTextBlock"
Expand Down Expand Up @@ -411,7 +413,12 @@
<RelativePanel>
<GridView
ItemsSource="{Binding EggsInventory}"
SelectionMode="None">
SelectionMode="None"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignBottomWithPanel="True">


<GridView.ItemsPanel>
<ItemsPanelTemplate>
Expand Down

0 comments on commit a70f6f0

Please sign in to comment.