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

Handling tap events

4 Answers 73 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 06 May 2014, 02:49 PM
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>

4 Answers, 1 is accepted

Sort by
0
Alek
Telerik team
answered on 09 May 2014, 08:43 AM
Hi Jan,

The current implementation of the TouchManager does not allowed you to handle events and this way to make changes in touch behavior. 

The differences you are noticing may be caused by the drivers which the different monitors are using. We did not manage to reproduce the behavior using our devices. 

As per the moment we are considering changes in TouchSupport in order to allow a gesture customization. 

Regards,
Alek
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jan
Top achievements
Rank 1
answered on 02 Jun 2014, 11:51 AM
Sorry for the late response.

I think that the ScheduleView reacts as expected on the differerent types of touch interfaces; the problem is when we want our custom appointment view to open instead. Should this be possible? from your answer I take it that it is not currently possible

Tapping works fine for the simple touch screen which handles everything as a mouseclick; the problem is opening our custom appointment view on the multi touch screens.

Adding the Tap or DoubleTap event handler in xaml/cs did not go so well ;)

Linje: 54
Fejl: Unhandled Error in Silverlight Application
Code: 2531   
Category: ParserError      
Message: Failed to assign to property 'System.Windows.UIElement.DoubleTap'.    
File:     
Line: 15    
Position: 108    

0
Accepted
Konstantina
Telerik team
answered on 03 Jun 2014, 10:57 AM
Hi Jan,

Not sure what you mean, when you say custom appointment view - is this a new EditAppointmentDialog? If you change it like this: http://www.telerik.com/help/silverlight/radscheduleview-features-customizing-dialog-windows.html there should be no problems.
Could you please explain what exactly you are aiming? Also, if you could send us a sample project and detailed information of your requirements, we will do our best to provide you with the best solution for your case.

Regards,
Konstantina
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jan
Top achievements
Rank 1
answered on 08 Oct 2014, 03:28 PM
It is resolved.

In one implementation a bit of code was missing.
And the other implementation started working after we upgraded to latest release of SL toolkit.
Tags
ScheduleView
Asked by
Jan
Top achievements
Rank 1
Answers by
Alek
Telerik team
Jan
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or