ListBox event to handle selection
up vote
0
down vote
favorite
I have a ListBox with multiple ListBoxItems within it. I'd like to have one function handle each selection so I don't have to create an event for each ListBoxItem being selected. (Like how Menu and MenuItems works.)
Basically, each time a new selection is made a new UserControl is loaded into a Grid depending on what's selected.
What's the event to use for this?
Thanks!
c# listbox
add a comment |
up vote
0
down vote
favorite
I have a ListBox with multiple ListBoxItems within it. I'd like to have one function handle each selection so I don't have to create an event for each ListBoxItem being selected. (Like how Menu and MenuItems works.)
Basically, each time a new selection is made a new UserControl is loaded into a Grid depending on what's selected.
What's the event to use for this?
Thanks!
c# listbox
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a ListBox with multiple ListBoxItems within it. I'd like to have one function handle each selection so I don't have to create an event for each ListBoxItem being selected. (Like how Menu and MenuItems works.)
Basically, each time a new selection is made a new UserControl is loaded into a Grid depending on what's selected.
What's the event to use for this?
Thanks!
c# listbox
I have a ListBox with multiple ListBoxItems within it. I'd like to have one function handle each selection so I don't have to create an event for each ListBoxItem being selected. (Like how Menu and MenuItems works.)
Basically, each time a new selection is made a new UserControl is loaded into a Grid depending on what's selected.
What's the event to use for this?
Thanks!
c# listbox
c# listbox
asked Nov 7 at 22:04
user642153
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Figured it out.
<ListBox SelectionChanged="MyFunction" />
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Figured it out.
<ListBox SelectionChanged="MyFunction" />
add a comment |
up vote
0
down vote
Figured it out.
<ListBox SelectionChanged="MyFunction" />
add a comment |
up vote
0
down vote
up vote
0
down vote
Figured it out.
<ListBox SelectionChanged="MyFunction" />
Figured it out.
<ListBox SelectionChanged="MyFunction" />
answered Nov 7 at 22:08
user642153
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53198565%2flistbox-event-to-handle-selection%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown