Esempio n. 1
0
        public async void SetContent()
        {
            //makes a new JsonChild object from webservice class
            JsonChild child = await webservice.GetChildData();

            //creates the label using information from JsonChild Class
            Label name = new Label
            {
                Text = child.firstname
            };
            Label lastName = new Label
            {
                Text = child.lastname
            };
            Label username = new Label
            {
                Text = child.username
            };
            Label age = new Label
            {
                Text = child.age.ToString()
            };
            Label points = new Label
            {
                Text = child.points.ToString()
            };

            //Adds each label to the stack
            infoStack.Children.Add(name);
            infoStack.Children.Add(lastName);
            infoStack.Children.Add(username);
            infoStack.Children.Add(age);
            infoStack.Children.Add(points);
        }