コード例 #1
0
        private async Task LoadServicesToStackPanel()
        {
            SpServices.Children.Clear();

            List <Service> services = await serviceApi.GetServices();

            if (services.Count > 0)
            {
                LblNoServices.Visibility = Visibility.Hidden;

                foreach (Service service in services)
                {
                    ServicePanel servicePanel = new ServicePanel(service, hairSalon);

                    SpServices.Children.Add(servicePanel);
                }
            }
            else
            {
                LblNoServices.Visibility = Visibility.Visible;
            }
        }