Convert List to ObservableCollection in WP7

后端 未结 10 933
不知归路
不知归路 2020-12-25 10:10

I don\'t know if it\'s just too late or what, but I don\'t see how to do this...

What I\'m expecting to do, and what the object browser says is there, is this:

10条回答
  •  我在风中等你
    2020-12-25 10:37

    The answer provided by Zin Min solved my problem with a single line of code. Excellent!

    I was having the same issue of converting a generic List to a generic ObservableCollection to use the values from my List to populate a ComboBox that is participating in binding via a factory class for a WPF Window.

    _expediteStatuses = new ObservableCollection(_db.getExpediteStatuses());

    Here is the signature for the getExpediteStatuses method:

    public List getExpediteStatuses()

提交回复
热议问题