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

getting Mouse input in RadTimeBar child control

1 Answer 23 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 19 Aug 2011, 02:03 PM
I have a control that is hosted in the RadTimeBar that contains items that the user can click. But the RadTimeBar seems to be capturing all mouse activity and the child control is not able to detect the clicks. Is there any way for a control hosted in RadTimeBar to receive mouse input

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 24 Aug 2011, 03:19 PM
Hi Joel,

Basically, the panel that hosts the content of the TimeBar (TimeBarContentPanel) lies beneath the other TimeBar panels, e.g. ItemContainer, GroupContainer, etc. That is why the hosted control cannot detect mouse interaction. However, you can take advantage of the TimeBar.HoveredPeriodChanged event and TimeBar.HoveredPeriod property, which will give you information for the hovered period and when it is changed. Based on this information you can implement custom logic for manually interaction with the hosted control in the hovered period range. For example:
timeBar.HoveredPeriodChanged += new EventHandler<HoveredPeriodEventArgs>(timeBar_HoveredPeriodChanged);
...
void timeBar_HoveredPeriodChanged(object sender, Telerik.Windows.Controls.TimeBar.HoveredPeriodEventArgs e)
{
    if (timeBar.HoveredPeriod.HasValue)
    {
        //implement custom logic
    }
}

I hope this information helps.

Best wishes,
Polina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TimeBar
Asked by
Joel
Top achievements
Rank 1
Answers by
Missing User
Share this question
or