& ltComboBoxItem?Content=\"-請選擇-\" & gt;& lt/combobox item & gt;& ltComboBoxItem?Con" />
當前位置:編程學習大全網 - 網站源碼 - 如何在VS2015C#WPF中向combobox下拉菜單添加內容?數據不綁定嗎

如何在VS2015C#WPF中向combobox下拉菜單添加內容?數據不綁定嗎

如果不想要數據綁定,就這樣寫

& ltComboBox?Margin="10 "?Width="150 "?SelectedIndex="0 "?Name="combobox " >

& ltComboBoxItem?Content="-請選擇-" & gt;& lt/combobox item & gt;

& ltComboBoxItem?Content= "Data 1 " >& lt/combobox item & gt;

& ltComboBoxItem?Content = " data2 " > & lt/combobox item & gt;

& ltComboBoxItem?Content = " Data3 " > & lt/combobox item & gt;

& lt/ComboBox & gt;

  • 上一篇:用簡單的語言寫程序。比如我寫了壹個筆記本。為什麽,把文本保存到。指定路徑,即不需要。
  • 下一篇:易語言如何連接SQL Server 2000的數據庫
  • copyright 2024編程學習大全網