0

I have ListPicker with databinding and I need to add first item "none" to binded items.

How can I do it?

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Earlgray
  • 647
  • 1
  • 8
  • 31

1 Answers1

0

You can wire up to the collection changed event on the data bound collection (ObservableCollection??). When it changes you could manipulate the list as needed.

Jras
  • 518
  • 3
  • 12
  • My collection is ObservableCollection, but ListPicker dont have event named collection changed or bound collection – Earlgray Mar 26 '13 at 23:37
  • The observablecollection has a collectionchanged event. If you are databinding to that list then just wire up to that event. When it changes you would want to check the length of the list. If it is 0 then add a default item. If it is 2 then remove the default item. etc. – Jras Mar 27 '13 at 15:28