Social Icons

Pages

WPF Change ListView based on Item Chosen in ComboBox


Here I'm going to describe simple way to display items in a ListView based on the Item selected on a ComboBox. Ultimate result would be like below images;



Step one: Create classes for items of both Combobox and ListView.
Step two: Design the application interface as below;
Step three: Code behind the main window,

Please comment below if you have any questions.
Enjoy !



1 comment:

  1. datacontext is a type but it is used like a variable.
    listview does not contain a definition for itemssource and no extension method itemsource accepting first argument of type listview could be found(are you missing a using directive or an accembly reference ) error

    ReplyDelete