Link to home
Start Free TrialLog in
Avatar of Ruttensoft
Ruttensoft

asked on

DataTemplate question...

Hello

I have a listbox with my own custom DataTemplate. On it, I have several items which are bound to some class.
One of the items is a StackPanel. Now I have a question about this. I have created a Parser which is converting a string (XML) into a Stackpanel, which is containing several, dynamic, elements. Now I want to set, that the Stackpanel on the DataTemplate is this stackpanel.

Usually, I am binding some attribute (e.g. Text) to a class, sometimes using a Converter. But how can I bind a whole StackPanel to a StackPanel, replacing it?

Or what different approach do I have to take?

Thank¨s a lot
ASKER CERTIFIED SOLUTION
Avatar of unmeshdave
unmeshdave
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ruttensoft
Ruttensoft

ASKER

Hm, I solved it with replacing the Stackpanel on the DataTemplate with a ContentPresenter, and then I am binding the Stackpanel to the Source of the ContentPresenter... That's all...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial