HOW DO I REMOVE A LISTBOX NEW ITEM PLACEHOLDER?

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
WPF 
WPF
 3483  View(s)
Ratings:
Rate this:

I have been scratching my head for a while with an extra item in a wrap panel for content in a ListBox.

I finally striped back my code and discovered the LixtBox itself has a New Item Placeholder at the end of the data I have bound to it.

I haven't been able to figure out how to disable the New Item Placeholder. Any suggestions?

  1. Pravesh Singh

    Post:412

    Points:2888
    Re: How do I remove a listbox new item placeholder?

    Hi Samuel,

    I discovered that the data source was being affected by a DataGrid. Within the same screen I am displaying detailed data in a DataGrid and also summary data in a ListBox.

    We don't allow users to add items to the DataGrid so after I set the DataGrid's CanUserAddRows="False" my problem went away.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!