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

Override Next Appointment / Previous Appointment navigation

3 Answers 101 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Andrei
Top achievements
Rank 1
Iron
Andrei asked on 11 Mar 2015, 02:22 PM
Is there a way to override the NextAppointment or PreviousAppointment button actions?

I have different types of appointments in a timeline view. And I need the previous and next buttons to ignore some of these types when navigating.

Is there a way to override this functionality ?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 16 Mar 2015, 08:30 AM
Hi Andrei,

In order to change the behavior of the AppointmentNavigationButtons you need to modify the default  RadScheduleViewStyle of RadScheduleVIew. Inside the ​RadScheduleViewControlTemplate you could find both buttons and apply a custom command that will be executed as soon the buttons are clicked:

<ControlTemplate x:Key="RadScheduleViewControlTemplate" TargetType="telerikScheduleView:RadScheduleView">
...
    <!--Change the command of the Button-->
    <telerik:RadButton CornerRadius="2 2 0 0" HorizontalContentAlignment="Stretch" Command="{x:Static telerikScheduleView:RadScheduleViewCommands.GoToNextAppointment}" FocusVisualStyle="{x:Null}">
        <Grid Width="160">
            <TextBlock telerik:LocalizationManager.ResourceKey="NextAppointment" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            <TextBlock Text="▼" FontSize="8" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="8 0"/>
        </Grid>
    </telerik:RadButton>  
...
 </ControlTemplate>

Hopes this helps.

Regards,
Nasko
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
Andrei
Top achievements
Rank 1
Iron
answered on 16 Mar 2015, 04:01 PM
Thank you.

Where is it best to get the default ControlTemplate based on which version of Telerik I am using ?

I can't use the latest version as there are some issues with it that I have yet to figure out , so I would like to make sure I get the right control template for my version.
0
Nasko
Telerik team
answered on 17 Mar 2015, 10:35 AM
Hi Andrei,

You could find the needed RadScheduleView resources for the version you're currently using from the installation folder on your machine (usually C://Program Files/Telerik/ UI for WPF [version]/). Inside that folder you will find the Themes.Implicit that contains all themes resources. RadScheduleView is inside the Telerik.Windows.Controls.ScheduleView.xaml which contains all the needed styles and ControlTemplates. I also suggest you using Implicit Styles theme mechanism for styling RadScheduleView.

I hope this will help you.

Regards,
Nasko
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.

 
Tags
ScheduleView
Asked by
Andrei
Top achievements
Rank 1
Iron
Answers by
Nasko
Telerik team
Andrei
Top achievements
Rank 1
Iron
Share this question
or