From the course: Visual Basic Essential Training
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Use a ListBox instead of a text control - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Use a ListBox instead of a text control
- [Instructor] Before we look at the collection types, in this chapter, I want to talk about one change I've made to the code explorer. It's this item right here. So up until this point when I've been showing items on this screen, I've either used a text box or a text block, and I've had to manage putting text on a line and setting a new line. We've seen that in some of the demos. There are controls in WPF that are optimized for working with collections, and the one I'm looking at in this course is the list box. So it's optimized to work with different kinds of collections that works very well with the list of T. So that's what I'll use for showing the information in this chapter. I named it output list box. Then what I can do in my code is I can put different kinds of data in there. You notice that if I look here, I'm going to my output box and it has an items property. If I hover over that, I see that that is a items collection. Yes, this is a collection. It's very similar to the…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Explore the collection classes10m 18s
-
(Locked)
Use a ListBox instead of a text control3m 10s
-
(Locked)
Create new collections6m 30s
-
(Locked)
Initialize a collection2m 23s
-
(Locked)
Add items to a list1m 13s
-
(Locked)
Get items from the list3m 16s
-
(Locked)
Remove items from a list1m 15s
-
(Locked)
Iterate over a list5m 20s
-
(Locked)
Bind a list to a user control5m 46s
-
(Locked)
Delegates and lambda expressions4m 36s
-
(Locked)
Customize a method with predicate functions5m 21s
-
(Locked)
Quick look at other collection classes4m 28s
-
(Locked)
-
-
-