public GetListTab() { Title = "Get List"; dataAccessPort = new DataAccessPort(); var getToken = dataAccessPort.GetToken(); InitializeComponent(); var CallOfficeList = dataAccessPort.CallOfficeList(getToken); foreach (var ofiiceListDto in CallOfficeList) { lblabel.Text += string.Format("\n Office Name : {0} \n Address : {1} \n Telephone Number : {2}", ofiiceListDto.OfficeName, ofiiceListDto.Address, ofiiceListDto.PhoneCell); } Content = lblabel; }
public MyListPage() { dataAccessPort = new DataAccessPort(); var getToken = dataAccessPort.GetToken(); InitializeComponent(); var lblLabel = new Label(); var callApi = dataAccessPort.CallOfficeList(getToken); foreach (var ofiiceListDto in callApi) { lblLabel.Text += string.Format("\n{0} \n{1} \n{2}", ofiiceListDto.OfficeName, ofiiceListDto.Address, ofiiceListDto.PhoneCell); } lblLabel.HorizontalOptions = LayoutOptions.Center; lblLabel.VerticalOptions = LayoutOptions.Center; Content = lblLabel; }