Received solution from Xceed:
Hi,
I would not use "ItemsControl.Template" and "ItemsControl.ItemTemplate", but instead use :
-"ItemsControl.ItemsPanel" to define the panel to use : TimelinePanel,
-"ItemsControl.ItemTemplate" to define the visual of each item,
-"ItemsControl.ItemContainerStyle" to define the attached property "Date" and "DateEnd". This is necessary since the ItemsControls will automatically create ContentPresenter for each items with the content being the "Border" defined in ItemsControl.ItemTemplate. To work correctly, the TimelinePanel needs to find the attached property "Date" and "DateEnd" at top level on its items, so on the ContentPresenters.
Something like :
<grid>
<itemscontrol x:name="_itemsControl" xmlns:x="#unknown">
ItemsSource="{Binding list, Source={StaticResource viewModel}}">
<itemscontrol.itemspanel>
<itemspaneltemplate>
<xtc:timelinepanel begindate="{Binding startHour, Source={StaticResource viewModel}}" xmlns:xtc="#unknown">
EndDate="{Binding endHour, Source={StaticResource viewModel}}"
Background="Aqua"/>
</xtc:timelinepanel></itemspaneltemplate>
</itemscontrol.itemspanel>
<itemscontrol.itemtemplate>
<datatemplate>
<border background="Blue">
Height="25"
Margin="0, 2, 0, 2">
<textblock text="{Binding name}">
Foreground="White"/>
</textblock></border>
</datatemplate>
</itemscontrol.itemtemplate>
<itemscontrol.itemcontainerstyle>
<style>
<setter property="xtc:TimelinePanel.Date">
Value="{Binding Path=start}"/>
<setter property="xtc:TimelinePanel.DateEnd">
Value="{Binding Path=end}" />
</setter></setter></style>
</itemscontrol.itemcontainerstyle>
</itemscontrol>
</grid>