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

Hold event

2 Answers 50 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vzaytzev
Top achievements
Rank 1
vzaytzev asked on 09 Oct 2012, 12:06 PM
Is it possible to update SelectedValue on Hold event? Or if not, how can I get the date at specific coordinates?

2 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Stanoev
Telerik team
answered on 12 Oct 2012, 02:23 PM
Hi Vasily,

Sorry for the delayed reply. You can obtain the date from coordinates using the following approach:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
    <StackPanel>
        <TextBlock HorizontalAlignment="Center" FontSize="24" x:Name="log" />
        <telerik:RadCalendar x:Name="calendar1" Hold="calendar1_Hold" />
    </StackPanel>
</Grid>
 
private void calendar1_Hold(object sender, System.Windows.Input.GestureEventArgs e)
{
    FrameworkElement source = e.OriginalSource as FrameworkElement;
    CalendarButton calendarButton = ElementTreeHelper.FindVisualAncestor<CalendarButton>(source);
    CalendarButtonContentInfo info = calendarButton.Content as CalendarButtonContentInfo;
    this.log.Text = info.Date.ToString();
}

Give it a try and let me know how it goes. I'd be glad to further assist you.

Regards,
Kiril Stanoev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
vzaytzev
Top achievements
Rank 1
answered on 12 Oct 2012, 04:44 PM
Thanks, works fine.
Tags
Calendar
Asked by
vzaytzev
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
vzaytzev
Top achievements
Rank 1
Share this question
or