WPF listbox. Skip underscore symbols in strings

前端 未结 4 914
南方客
南方客 2020-12-20 11:19

I have some WPF ListBox which is dynamically populating with items. Something like this :

ListBox.Items.Add
(new ListBoxItem { Content = new CheckBox { IsChe         


        
4条回答
  •  难免孤独
    2020-12-20 11:27

    Use a double underscore string__string, since in WPF, the _ is the mnemonic character.

    Even better, just solve this issue in xaml and create a collection in your view model (or code-behind).

提交回复
热议问题