Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF : Nullable ComboBox

I want to have an empty item in the comboBox to allow the user to "Unselect" and keep the comboBox empty (Null value).

How can I do that?

like image 816
Yannic Avatar asked Sep 04 '09 12:09

Yannic


1 Answers

Make your life easier by using a sentinel value. That is, an instance of your view model class that represents nothing.

like image 61
Kent Boogaart Avatar answered Nov 15 '22 06:11

Kent Boogaart