WPF ComboBox Last item should be selected

If we want that our comboBox will select the last item, in combobox loading time then you can use


  private void LoadComboBo()
        {
            comboBox1.Items.Add("Atik");
            comboBox1.Items.Add("Amin");
            comboBox1.Items.Add("Nabab");
            comboBox1.Items.Add("Refat");
            comboBox1.SelectedIndex = comboBox1.Items.Count - 1;
        }

Popular posts from this blog

mvc razor textboxfor change event change another textboxfor value

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report