Ejemplo n.º 1
0
        public HomePage()
        {
            App.Current.Container.BuildUp(typeof(HomePage), this);

            var viewModel = new UiHomePage();

            _InitializeStyles(viewModel);
            this.DataContext = viewModel;

            InitializeComponent();
        }
Ejemplo n.º 2
0
 private void _InitializeStyles(UiHomePage viewModel)
 {
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "ALL", Name = "Alle"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "SOUR", Name = "Sauer"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "SWEET", Name = "Süß"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "BITTER", Name = "Bitter"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "FRUITY", Name = "Fruchtig"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "DRY", Name = "Trocken"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "FRESH", Name = "Erfrischend"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "CREAMY", Name = "Cremig"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "SPICY", Name = "Würzig"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "1STAR", Name = "1+ Sterne Bewertung"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "2STAR", Name = "2+ Sterne Bewertung"
     });
     viewModel.Styles.Add(new UiDrinkStyle {
         Id = "3STAR", Name = "3 Sterne Bewertung"
     });
     viewModel.SelectedStyle = viewModel.Styles.FirstOrDefault();
 }