Collapse | Copy Code
private void Window_Loaded_1(object sender, RoutedEventArgs e)
{
int ymax = 500;
parentchart.Axes.Add(new LinearAxis() { Minimum = 0, Orientation=AxisOrientation.Y, Maximum = ymax > 0 ? ymax : 300 });
txty.Text = ymax.ToString();
List<int> inp = new List<int>();
for (int i = 0; i <= ymax; i++)
{
inp.Add(i);
textbox.Text = inp.ToString();
cmbb.ItemsSource = inp;
cmbb.SelectedIndex = 0;
}
}
textbox.Text += inp.ToString();
StringBuilder sb = new StringBuilder;
string sep = "";
for (int i = 0; i <= ymax; i++)
{
inp.Add(i);
sb.AppendFormat("{0}{1}", sep, inp);
sep = ",";
cmbb.ItemsSource = inp;
cmbb.SelectedIndex = 0;
}
textbox.Text = sb.ToString();