I have added a DataTemplate
to a ListBox
class to bind my collection to:
If you have multiple instance of ListBox
then you may consider using your custom listbox (by deriving it from ListBox
). See the explanation here.
Or, use this hack if you have only 1 (or only small number of) such ListBox
and don't want to create a separate class for that:
Note that you'll have to click once again to edit text in the TextBox
(which is actually cool according to me).