Lets say you have 3 classes. Class A and Class B derive from class C:Class C { public int c; }Class B: C { public int b; }
Class A: C { public int a; }If I create a collection populated with class A & B objects, the node binder doesn't seem capable of treating them like Class C objects:// somewhere in the code behind... building a collection that is to be assigned to the XamTreemap.ItemsSource propertyIList<C> mylist = new List<C>();mylist.Add(new B());mylist->Add(new A());// in xaml:<ig:NodeBinder TargetTypeName="C" /* other irrelevant property assignments */ ></ig:NodeBinder>If i do roughly the above, the control doesn't show anything. If I change the code behind such that I populate mylist with only objects of type Class C, it works just fine:
// changing my code behind to this causes the infragistics control to populate appropriatelyIList<C> mylist = new List<C>();mylist.Add(new C());mylist->Add(new C());Is there a way to get the control to treat objects in a list as there base class? Or even an interface might work. The list of objects has other uses than just populating the control. I'd rather not have the code go through the pain staking process of recreating an entire list when that could be thousands of objects that are far more complicated than the ones I've shown here when all I really need is access to the base class properties to properly populate the tree map.
Hi,
The fix is available in the latest public service release for our 12.1 Silverlight controls - 2206.
In order to download it you could go to your Infragistics account, click on the according product key, and you could find a link to this service release under the "Service Releases" tab.
Please feel free to let us know if you have any other questions with this matter.
Thanks
Ok. So.. just to be clear. Are those changes available now or in a future release?
Thanks Stefana.
Hi Ryan,
You are correct!
It looks like an issue in the RTM version that has already been fixed in the latest SR.
I hope this will really solve the problem.
I am waiting for your feedback!
Thanks,
Stefana
Well, if that attached project works for you then likely it's an environment issue because it doesn't work for me unless I modify it. The main difference that I can think of is that I'm using the evaluation version of the dll's. Both my project and the sample code you attached are using silverlight 5. I'm using the same versions of the dll's. Everything else mostly seems to be the same.
The attached sample works fine, all nodes are displayed and no such message is displayed.
May be there are some other differences between the attached sample scenario and yours - XAML definition or something else. It would be nice if you provide some more detailed code snippets, so that I can isolate the actual problem.
Thanks again,