Default text in combobox

前端 未结 1 1735
Happy的楠姐
Happy的楠姐 2021-01-07 09:58

I have 2 comboboxes like on the image and would like to know if it is possible to set some kind of text field for the combobox (so the first box would state Members). This w

相关标签:
1条回答
  • 2021-01-07 10:05

    The effect you are looking for is called a 'watermark', this can be achieved with a value converter as described in the following questions:

    Watermark / hint text / placeholder TextBox in WPF

    How to display default text "--Select Team --" in combo box on pageload in WPF?

    Or via a behaviour, as described in the blogpost:

    http://pwlodek.blogspot.com/2009/11/watermark-effect-for-wpfs-textbox.html

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