This is a migrated thread and some comments may be shown as answers.

Obtaining TimelineItemGroupControl

2 Answers 92 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
Amige
Top achievements
Rank 1
Veteran
Amige asked on 07 Dec 2014, 12:34 AM
Hello,

I am using a TimeLine control in which I have several groups.
I'd like to know if there is a way to get the TimelineItemGroupControl over which I am moving the mouse.
In my scenario I am selecting a row from a GridView and drag-and-drop over the TimeLine control, and depending on the group that I drop the row I need to perform some action.

The TimeLine control has the next style:

<Style TargetType="telerik:TimelineItemGroupControl">
      <Setter Property="IsExpanded" Value="True" />
      <Setter Property="Header" Value="{x:Null}"/>
</Style>


Thanks in advance,

Alberto

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetie
Telerik team
answered on 09 Dec 2014, 01:27 PM
Hello Alberto,

You can use the OriginalSource property of the DragEventArgs. For example:

using Telerik.Windows.Controls;
using Telerik.Windows.DragDrop;
using Telerik.Windows.Controls.Timeline;
private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs args)
{
    var source = args.OriginalSource as FrameworkElement;
    var timelineGroup = source.ParentOfType<TimelineItemGroupControl>();
}

Regards,
Tsvetie
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Amige
Top achievements
Rank 1
Veteran
answered on 10 Dec 2014, 12:31 AM
Hello Tsvetie,

Thanks for the help, that's what I was looking for.

Regards,

Alberto
Tags
TimeLine
Asked by
Amige
Top achievements
Rank 1
Veteran
Answers by
Tsvetie
Telerik team
Amige
Top achievements
Rank 1
Veteran
Share this question
or