private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            var manager = new TuincentrumManager();

            ComboBoxSoorten.ItemsSource       = manager.GetSoorten();
            ComboBoxSoorten.SelectedValuePath = "SoortNr";
            ComboBoxSoorten.DisplayMemberPath = "Naam";
        }
        private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            var manager = new TuincentrumManager();

            ListBoxLijst.ItemsSource       = manager.GetPlanten();
            ListBoxLijst.DisplayMemberPath = "Naam";

            List <Soort> comboboxVullen = new List <Soort>();

            comboboxVullen = manager.GetSoorten();
            comboboxVullen.Insert(0, new Soort(0, ""));
            ComboBoxSoort.ItemsSource       = comboboxVullen;
            ComboBoxSoort.DisplayMemberPath = "Naam";
        }
예제 #3
0
        private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            var manager = new TuincentrumManager();

            ComboBoxSoort.ItemsSource       = manager.GetSoorten();
            ComboBoxSoort.SelectedValuePath = "SoortNr";
            ComboBoxSoort.DisplayMemberPath = "Naam";
            edit = false;

            foreach (StackPanel stackpanel in StackPanelTextBoxen.Children)
            {
                foreach (Control c in stackpanel.Children)
                {
                    if (c is TextBox)
                    {
                        TextBox tb = c as TextBox;
                        tb.IsEnabled = false;
                    }
                }
            } //ComboBoxSoort.IsEnabled = false;
        }