字符串数组添加到组合框的C#WPF [英] Add string array to combobox c# wpf

查看:1064
本文介绍了字符串数组添加到组合框的C#WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要12串添加到WPF应用程序组合框。使用XAML是很辛苦,因为我有一个添加一个。所以我用字符串数组这样做。

I need to add 12 strings to a ComboBox in WPF application. Using XAML is very hard because I have to add one by one. So I used string array to do so.

我用下面的code,

string[] arrayMonth = new string[] { "January", "February", "March", "April", "May",  
    "June", "July", "August", "September", "October", "November", "December"};

cmbMonth_Finance_ES.ItemsSource = arrayMonth;

不过,组合框负荷空。我尝试了所有在互联网上却一无所获。所以,请大家帮我添加字符串数组转换成一个ComboBox。

But ComboBox loads empty. I tried all over the internet but found nothing. So please help me to add string array into a ComboBox.

推荐答案

这是工作的罚款在我结束。你看。

It is working fine at my end. Look.

这篇关于字符串数组添加到组合框的C#WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆