Hi,
<Style TargetType="{x:Type igDP:DataRecordPresenter}"> <Setter Property="HeaderAreaBackground" Value="{x:Null}"/> <Setter Property="Template"> .... </Setter> <Setter Property="TemplateCardView"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:DataRecordPresenter}"> <StackPanel>
<ContentPresenterx:Name="PART_RecordContentSite"Visibility="Collapsed"Content="{TemplateBinding DataContext}"ContentTemplate="{TemplateBinding RecordContentAreaTemplate}"/>
</StackPanel> </ControlTemplate> </Setter.Value> </Setter></Style>
But I would like to handle the corresponding "event" in my "vov:VideoThumbnail" control.
Do you know how I can do this ?
There are a few ways you can do this. As you probably have discovered, you cannot simply access the VideoThumbnail since it is declared in a template.
One way is to use the VisualTreeHelper to look for the ViewoThumbnail during runtime. The object is embedded in the Field and can be accessed through the Field hierarchy.
A simpler way would be to provide an event for when the VideoThumbnail is initialized. In the event handler you can store a reference to the object for later access.
The great thing about WPF is there are probably several other solutions.
Thanks,