Add items to comboBox in WPF

前端 未结 7 1858
谎友^
谎友^ 2021-02-03 21:38

When I have added a comboBox to the WPF window, how do I add items to the comboBox? Int the XAML code for the design or in NameOfWindow.xaml.cs file?

相关标签:
7条回答
  • 2021-02-03 22:21

    You can fill it from XAML or from .cs. There are few ways to fill controls with data. It would be best for You to read more about WPF technology, it allows to do many things in many ways, depending on Your needs. It's more important to choose method based on Your project needs. You can start here. It's an easy article about creating combobox, and filling it with some data.

    0 讨论(0)
提交回复
热议问题