Is there a way to define a template for ListBox to appear when ItemsSource
is set to an empty collection? E.g. I want to show "No entries" text if the
result of a DB query is empty set.
Thanks,
-O.
Is there a way to define a template for ListBox to appear when ItemsSource
is set to an empty collection? E.g. I want to show "No entries" text if the
result of a DB query is empty set.
Thanks,
-O.
Hi,
OgreFX wrote:Yes, you can use a Style with a DataTrigger observing the collection you
> Is there a way to define a template for ListBox to appear when ItemsSource
> is set to an empty collection? E.g. I want to show "No entries" text if the
> result of a DB query is empty set.
>
> Thanks,
> -O.
set to the ItemsSource, and setting the "Template" property to something
else if the Count is 0.
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| (Empty) 'New' menu, empty start menu, BRAND NEW VISTA! | kikiluna | General Discussion | 6 | 27 Dec 2008 |
| Vista explorer - Folder empty, but is not empty, why? | Sandra Baum | Vista General | 0 | 14 Dec 2008 |
| Help with the collection contains method | Tanzen | .NET General | 7 | 19 Jun 2008 |
| file folder icons display non-empty folders as empty | nodaway | Vista file management | 1 | 26 Dec 2007 |
| ListBox ItemTemplate Wrapping and others | Jan Kucera | Avalon | 0 | 07 Nov 2006 |