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

Databinding with collection of collection

$
0
0

Hi

I have below class structure.

public class TopLevelClass    {        public ObservableCollection<ChildLevel1Class> CounterGroupCollection        {            get;        }    } public class ChildLevel1Class {     public ObservableCollection<ChildLevel2Class> Counters     {         get;     } } public class ChildLevel2Class : INotifyPropertyChanged    {        ObservableCollection<System.Windows.Point> _points = new ObservableCollection<System.Windows.Point>();        public ObservableCollection<System.Windows.Point> Points        {            get { return _points; }        }    }

I am creating few controls on a canvas. What I want to do is to bind the Top and Left properties of these controls with the X and Y

co-ordinates of the Points collection in the ChildLevel2Class.

So this is something like I have a tree view like class structure which I want to bind it with some controls on canvas

which are at same level.

Can someone help me with such a scenario on how can I establish data binding here.

Regards

JC



Viewing all articles
Browse latest Browse all 18858

Trending Articles



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