private void BuildResultFrames(List <Encounter> encounters) { var backButton = new Button { Text = "Back" }; backButton.Clicked += backButton_Clicked; if (encounters.Count == 0) { var label = new Label { Text = "No Results Found", HorizontalOptions = LayoutOptions.CenterAndExpand, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)) }; resultsSection.Children.Add(label); resultsSection.Children.Add(backButton); } else { //Builds the Frames and Adds them to the page foreach (var e in encounters) { string dropped; if (e.Dropped == 1) { dropped = "yes"; } else { dropped = "no"; } var frame = new Frame { BorderColor = Color.Gray, HasShadow = true, Content = new StackLayout { Orientation = StackOrientation.Horizontal, Children = { new StackLayout { HorizontalOptions = LayoutOptions.StartAndExpand, Children = { new Label { Text = e.EncounterName, }, new Label { Text = _conn.GetCharacterById(e.CharId).CharName, }, new Label { Text = "Session: " + e.Session.ToString("MMM dd @ h:mm tt") } } }, new StackLayout { HorizontalOptions = LayoutOptions.EndAndExpand, Children = { new Label { Text = "Kills: " + e.Kills }, new Label { Text = "Assists: " + e.Assist }, new Label { Text = "Dropped: " + dropped } } }, new StackLayout { HorizontalOptions = LayoutOptions.EndAndExpand, Children = { new Label { Text = "Dealt: " + e.DmgDealt }, new Label { Text = "Taken: " + e.DmgTaken }, new Label { Text = "Healing: " + e.Healing } } } } } }; resultsSection.Children.Add(frame); } resultsSection.Children.Add(backButton); } }