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

Binding Content from ContentPresenter to ContentPresenter

$
0
0

hey there;

 I have a Hierachical DataTemplate for a Customer object and inside this template I have a contentpresenter to show a address object. so basically something like this

<HierachicalDatatemplate DataType="{x:Type Interfaces:ICustomer}" x:Key="CutomerItem">

...
    <ContentPresenter Content="{Binding Address}" ContentTemplate="{StaticResource AddressItem}" /></HierachicalDatatemplate>

in my UserControl I use another ContentPresenter to show the Customer 

<ContentPresenter Content="{Binding Customer}" ContentTemplate="{StaticResource CustomerItem}" />

so the normal properties gets displayed but the ContentPresenter inside The CustomerItem  is not showing the DataTemplate for the Address. How do I get the Content in this contentpresenter content? Im pretty lost here because all the stuff you find on the net is with ContentControl or ControlTemplates never found a case with contentpresenter inside a datatemplate that is nested in  another contentpresenter. And somewere down the tree the binding breaks epically :/

hope some can bring some light into this 

regards

Markus


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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