WPF Binding My.Settings collection to Combobox items

前端 未结 5 2050
长情又很酷
长情又很酷 2021-02-15 16:18

I\'m VERY new to WPF, and still trying to wrap my head around binding in XAML.

I\'d like to populate a combobox with the values of a string collection in my.settings. I

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-15 17:07

    I have a simpler solution for doing that, using a custom markup extension. In your case it could be used like this :

    
        
            
        
    
    

    You can find the C# code for this markup extension on my blog here : http://www.thomaslevesque.com/2008/11/18/wpf-binding-to-application-settings-using-a-markup-extension/

提交回复
热议问题