WPF form - fill combobox with information from the main code

WPF form - fill combobox with information from the main code

Anonymous
Not applicable
730 Views
2 Replies
Message 1 of 3

WPF form - fill combobox with information from the main code

Anonymous
Not applicable

Hello Everybody!

I am starting to create some forms.

I would like to fill a combobox quth any information (see code below)

Window1 w = new Window1();
						
for (int i = 1; i==5; i++)
{
	string s = i.ToString();
	w.combobox1.Items.Add(s);
}

w.ShowDialog();

TaskDialog.Show("test","Selected number is " + w.combobox1.SelectedItem);

the combobox shoul receive a lis of numbers from 1 to 5, buy I do not why it is empty.

 

Any help?

 

 

thanks in advance and sorry if my question is stupid

0 Likes
Accepted solutions (1)
731 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Chema78,

 

There are no stupid questions!

 

Unfortunately, though, this is the wrong place for it.

 

Please note that this discussion forum is dedicated to programming Revit using the Revit API.

 

Therefore, you cannot expect an answer to a question such as yours that has nothing to do with the Revit API here.

 

I hope this clarifies.

 

Thank you for your understanding.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

Anonymous
Not applicable

Thanks Jeremy!

You are right! this is a general coding question.. I put it here because i am programming with Revit API!!

 

anyway the solution is that i was doing the for wrounly 😞 

0 Likes