private void AddBasicInfoCard(string username, GetOrganizationResponse response) { DisplayCard card = new DisplayCard(); StackPanel content = new StackPanel(); card.CardTitle = "About"; content.Margin = new Thickness(16, 0, 16, 16); TextBlock info = new TextBlock(); info.Text = response.Description; info.TextWrapping = TextWrapping.WrapWholeWords; content.Children.Add(info); card.PlaceHolder = content; AboutPanel.Children.Add(card); card = new DisplayCard(); content = new StackPanel(); card.CardTitle = "Contact"; content.Margin = new Thickness(16, 0, 16, 16); TextBlock contactInfo = new TextBlock(); contactInfo.Text = "Phone: " + response.Phone + "\n"; contactInfo.Text += "Email: " + userName + "\n"; contactInfo.Text += "Website: " + response.Website; content.Children.Add(contactInfo); card.PlaceHolder = content; AboutPanel.Children.Add(card); }
private void AddBasicInfoCard(string username, GetIndividualResponse response) { DisplayCard card = new DisplayCard(); StackPanel content = new StackPanel(); card.CardTitle = "Basic information"; content.Margin = new Thickness(16, 0, 16, 16); TextBlock info = new TextBlock(); info.Text = "Firstname:\t" + response.FirstName + "\n" + ((response.MiddleName != "") ? "Middlename:\t" + response.MiddleName + "\n" : "") + "Lastname:\t" + response.LastName + "\n\n"; info.Text += "Birthday:\t\t" + response.DOB.ToString("d") + "\n"; info.Text += "Gender:\t\t" + (response.Gender ? "Male" : "Female"); content.Children.Add(info); card.PlaceHolder = content; AboutPanel.Children.Add(card); }