aTKn94 adlı üyeden alıntı: mesajı görüntüle
sen combobox'dan 3 tane ekliyorsun.. datetimepicker'De ise bir tane combobox var gibi seçiyorsun.. zaten combobox'a benziyor.. sadece kod kullanımı daha kolay.. tek tek combobox'larla uğraşırsan işiniz içinden çıkamassın
DateTimePicker kullanmak istemiyorum çünkü mesela 1985 yılına gitmek için çok çaba sarf etmek gerekiyor ona bir çözümün varmı? Kullanıcı 1990 yılınıde seçebilir 1960 da ?


Sorunu çözdüm işinize yarayabilir.
private void button1_Click(object sender, EventArgs e)
        {
            comboBox1.Items.Clear();
            for (int i = 1920; i<=1980; i++) comboBox1.Items.Add(i);
            for (int x = 1; x <= 12; x++) comboBox2.Items.Add(x);
            for (int y = 1; y <= 31; y++) comboBox3.Items.Add(y);
            comboBox1.SelectedIndex = 0;
            comboBox2.SelectedIndex = 0;
            comboBox3.SelectedIndex = 0;
        }

        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            int gun = DateTime.DaysInMonth((int)comboBox1.SelectedItem,(int) comboBox2.SelectedItem);
            MessageBox.Show(gun.ToString());
            comboBox3.Items.Clear();
            for (int say = 1; say <= gun; say++) comboBox3.Items.Add(say);
        }
windows form uygulamasında çalışan bu örnek her ne hikmetse wpf'de çalışmıyor winform'da SelectedIndexChanged olan event wpf'de SelectionChanged diye geçiyor ama hatalı çalışıyor