Hi
We have just updated an old project to latest release with a few challenges.. well skipping 1½ years will do that
One of the reasons to upgrade was the gesture support.
On some touch screens (older/simple?) a single tap = MouseLeftButtonUp... Which with the current code opens our custom appointment dialog.
On newer touch screens a single tap selects a timeslot or an appointment.
And on these touch screens a double tap selects and opens the appointment in the generic telerik appointment dialog.
We want the single and double tap to open the selected appointment in our custom appointment view. However I was not able to find any information in documentation / examples.
Notice that for both types of screens, a double tap on an “empty/non-booked” area of the scheduler is considered a AppointmentCreatingEvent which is expected => this works as expected.
The existing xaml code:
<UserControl x:Class="CTA.Views.Calendar.Calendar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
xmlns:local="clr-namespace:CTA.Views.Calendar"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<UserControl.Resources>
<DataTemplate x:Key="AppointmentTemplate">
<TextBlock Text="{Binding Subject}" MouseLeftButtonUp="StackPanel_MouseLeftButtonUp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" FontSize="14" />
</DataTemplate>
</UserControl.Resources>
<ScrollViewer x:Name="CalScrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Height="702">
<ScrollViewer.Resources>
<Style TargetType="ScrollBar">
<Setter Property="MinWidth" Value="50" />
</Style>
</ScrollViewer.Resources>
<telerik:RadBusyIndicator x:Name="RadBusyIndicator" IsBusy="{Binding IsLoading}">
<StackPanel x:Name="LayoutRoot" Background="White">
<telerik:RadScheduleView x:Name="RadCalendar" FontSize="12"
FirstDayOfWeek="Monday"
AppointmentEdited="RadCalendar_AppointmentEdited"
AppointmentCreating="RadCalendar_AppointmentCreating"
AppointmentEditing="RadCalendar_AppointmentEditing"
AppointmentDeleting="RadCalendar_AppointmentDeleting"
AppointmentItemContentTemplate="{StaticResource AppointmentTemplate}"
MaxTimeRulerExtent="1000" MinTimeRulerExtent="1000" Width="960" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<telerik:RadScheduleView.ViewDefinitions>
<telerik:DayViewDefinition Title="{Binding [Ui.CTA.Day], Source={StaticResource Localizer}}" MajorTickLength="1h" MinorTickLength="30min" DayStartTime="7:00:00" DayEndTime="21:00:00"
TimerulerMajorTickStringFormat="{}{00:%H}.{00:%mm}"/>
<telerik:WeekViewDefinition Title="{Binding [Ui.CTA.Week], Source={StaticResource Localizer}}" MajorTickLength="1h" MinorTickLength="30min" DayStartTime="7:00:00" DayEndTime="21:00:00"
TimerulerMajorTickStringFormat="{}{00:%H}.{00:%mm}"/>
<telerik:MonthViewDefinition Title="{Binding [Ui.CTA.Month], Source={StaticResource Localizer}}" DayStartTime="7:00:00" DayEndTime="21:00:00" />
</telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>
</StackPanel>
</telerik:RadBusyIndicator>
</ScrollViewer>
</UserControl>
We have just updated an old project to latest release with a few challenges.. well skipping 1½ years will do that
One of the reasons to upgrade was the gesture support.
On some touch screens (older/simple?) a single tap = MouseLeftButtonUp... Which with the current code opens our custom appointment dialog.
On newer touch screens a single tap selects a timeslot or an appointment.
And on these touch screens a double tap selects and opens the appointment in the generic telerik appointment dialog.
We want the single and double tap to open the selected appointment in our custom appointment view. However I was not able to find any information in documentation / examples.
Notice that for both types of screens, a double tap on an “empty/non-booked” area of the scheduler is considered a AppointmentCreatingEvent which is expected => this works as expected.
The existing xaml code:
<UserControl x:Class="CTA.Views.Calendar.Calendar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
xmlns:local="clr-namespace:CTA.Views.Calendar"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<UserControl.Resources>
<DataTemplate x:Key="AppointmentTemplate">
<TextBlock Text="{Binding Subject}" MouseLeftButtonUp="StackPanel_MouseLeftButtonUp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" FontSize="14" />
</DataTemplate>
</UserControl.Resources>
<ScrollViewer x:Name="CalScrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Height="702">
<ScrollViewer.Resources>
<Style TargetType="ScrollBar">
<Setter Property="MinWidth" Value="50" />
</Style>
</ScrollViewer.Resources>
<telerik:RadBusyIndicator x:Name="RadBusyIndicator" IsBusy="{Binding IsLoading}">
<StackPanel x:Name="LayoutRoot" Background="White">
<telerik:RadScheduleView x:Name="RadCalendar" FontSize="12"
FirstDayOfWeek="Monday"
AppointmentEdited="RadCalendar_AppointmentEdited"
AppointmentCreating="RadCalendar_AppointmentCreating"
AppointmentEditing="RadCalendar_AppointmentEditing"
AppointmentDeleting="RadCalendar_AppointmentDeleting"
AppointmentItemContentTemplate="{StaticResource AppointmentTemplate}"
MaxTimeRulerExtent="1000" MinTimeRulerExtent="1000" Width="960" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<telerik:RadScheduleView.ViewDefinitions>
<telerik:DayViewDefinition Title="{Binding [Ui.CTA.Day], Source={StaticResource Localizer}}" MajorTickLength="1h" MinorTickLength="30min" DayStartTime="7:00:00" DayEndTime="21:00:00"
TimerulerMajorTickStringFormat="{}{00:%H}.{00:%mm}"/>
<telerik:WeekViewDefinition Title="{Binding [Ui.CTA.Week], Source={StaticResource Localizer}}" MajorTickLength="1h" MinorTickLength="30min" DayStartTime="7:00:00" DayEndTime="21:00:00"
TimerulerMajorTickStringFormat="{}{00:%H}.{00:%mm}"/>
<telerik:MonthViewDefinition Title="{Binding [Ui.CTA.Month], Source={StaticResource Localizer}}" DayStartTime="7:00:00" DayEndTime="21:00:00" />
</telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>
</StackPanel>
</telerik:RadBusyIndicator>
</ScrollViewer>
</UserControl>