TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abolfazl
NA
184
80.7k
Getting Combobox Selected Value in WPF
Mar 21 2015 5:42 PM
hi
i want to get selected value of a combobox that created in WPF,
i use this code :
private void cmb_StuffGroup_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
string str;
ComboBoxItem item = (ComboBoxItem)cmb_StuffGroup.SelectedItem;
str = item.Content.ToString();
MessageBox.Show(str, "ITEM");
}
but when i run this code it stop with InvalidCastExeption in line 4.
whats wrong with this code??
thanks
Reply
Answers (
1
)
Setting a style on a single element
How to display parent and child relation records in datagrid