예제 #1
0
        private void TypeSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (type.SelectedItem != null)
            {
                typeName = type.SelectedItem.ToString();
                //resultDrink = service.ExecuteAllDrinks(indexFilter, typeName, null);
                var taskDrink = Task.Run(() =>
                {
                    return(service.ExecuteAllDrinks(indexFilter, typeName, null));
                }).Result;

                resultDrink = taskDrink;
                listCoctails.ItemsSource = resultDrink.Drinks;
            }
            else
            {
                typeName = "";
            }
        }