Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Bind Matrix List Collection(collection within collection) in WPF

$
0
0

Hi ,

I am new to the WPF MVVM framework. I am stuck in a binding scenario and need help to clear it. 

I want to create a dynamic ROW and COLUMN like table and bind it the View (GUI), for that I created a

collection within collection(ObservableCollection<ObservableCollection<string>>) representing row and column behaviour.

I have binded this collection to my ListBox Control

but stuck in one place, where I need to get selected item from the inner collection.

Please find below my XAML sample with ViewModel Properties:

GUI: [http://i.stack.imgur.com/65Abb.jpg]

Binded Properties to GUI: [http://i.stack.imgur.com/VDkmn.jpg]


I used ListBox control in my application, please suggest me the best way to represent Matrix like collection in UI. and also 

I need to get the selected item from the Inner ListBox and inner collection in my VIewModel. 


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>