private void DisplayStats()
        {
            StatsListView.Items.Clear();
            GamesLabel.Content  = SelectedStats.TotalSessionsPlayed;
            WinsLabel.Content   = SelectedStats.TotalSessionsWon;
            LossesLabel.Content = SelectedStats.TotalSessionsPlayed - SelectedStats.TotalSessionsWon;
            if (SelectedStats.TotalSessionsPlayed != 0)
            {
                RatioLabel.Content = string.Format("{0:0.00}%", (SelectedStats.TotalSessionsWon / SelectedStats.TotalSessionsPlayed) * 100);
            }
            else
            {
                RatioLabel.Content = "100%";
            }

            Type classType = typeof(AggregatedChampion);

            foreach (FieldInfo field in classType.GetFields(BindingFlags.Public | BindingFlags.Instance))
            {
                if ((double)field.GetValue(SelectedStats) == 0)
                {
                    continue;
                }
                ProfilePage.KeyValueItem item = new ProfilePage.KeyValueItem
                {
                    Key   = Client.TitleCaseString(string.Concat(field.Name.Select(e => Char.IsUpper(e) ? " " + e : e.ToString())).TrimStart(' ')),
                    Value = field.GetValue(SelectedStats)
                };

                if (((string)item.Key).Contains("Time"))
                {
                    TimeSpan span = TimeSpan.FromMinutes((double)item.Value);
                    if (((string)item.Key).Contains("Time Spent Living"))
                    {
                        span = TimeSpan.FromSeconds((double)item.Value);
                    }
                    item.Value = string.Format("{0:D2}d:{1:D2}m:{2:D2}s", span.Days, span.Minutes, span.Seconds);
                }

                StatsListView.Items.Add(item);
            }

            if (double.IsNaN(KeyHeader.Width))
            {
                KeyHeader.Width = KeyHeader.ActualWidth;
            }
            if (double.IsNaN(ValueHeader.Width))
            {
                ValueHeader.Width = ValueHeader.ActualWidth;
            }
            KeyHeader.Width   = double.NaN;
            ValueHeader.Width = double.NaN;
        }
        private void DisplayStats()
        {
            StatsListView.Items.Clear();
            GamesLabel.Content = SelectedStats.TotalSessionsPlayed;
            WinsLabel.Content = SelectedStats.TotalSessionsWon;
            LossesLabel.Content = SelectedStats.TotalSessionsPlayed - SelectedStats.TotalSessionsWon;
            if (SelectedStats.TotalSessionsPlayed != 0)
            {
                RatioLabel.Content = string.Format("{0:0.00}%", (SelectedStats.TotalSessionsWon / SelectedStats.TotalSessionsPlayed) * 100);
            }
            else
            {
                RatioLabel.Content = "100%";
            }

            Type classType = typeof(AggregatedChampion);
            foreach (FieldInfo field in classType.GetFields(BindingFlags.Public | BindingFlags.Instance))
            {
                if ((double)field.GetValue(SelectedStats) == 0)
                    continue;
                ProfilePage.KeyValueItem item = new ProfilePage.KeyValueItem
                {
                    Key = Client.TitleCaseString(string.Concat(field.Name.Select(e => Char.IsUpper(e) ? " " + e : e.ToString())).TrimStart(' ')),
                    Value = field.GetValue(SelectedStats)
                };

                if (((string)item.Key).Contains("Time"))
                {
                    TimeSpan span = TimeSpan.FromMinutes((double)item.Value);
                    if (((string)item.Key).Contains("Time Spent Living"))
                        span = TimeSpan.FromSeconds((double)item.Value);
                    item.Value = string.Format("{0:D2}d:{1:D2}m:{2:D2}s", span.Days, span.Minutes, span.Seconds);
                }

                StatsListView.Items.Add(item);
            }

            if (double.IsNaN(KeyHeader.Width))
            {
                KeyHeader.Width = KeyHeader.ActualWidth;
            }
            if (double.IsNaN(ValueHeader.Width))
            {
                ValueHeader.Width = ValueHeader.ActualWidth;
            }
            KeyHeader.Width = double.NaN;
            ValueHeader.Width = double.NaN;
        }