Override Next Appointment / Previous Appointment navigation

4 posts, 0 answers
  1. Andrei
    Andrei avatar
    7 posts
    Member since:
    Jan 2013

    Posted 11 Mar 2015 Link to this post

    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 ?
  2. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 16 Mar 2015 Link to this post

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Andrei
    Andrei avatar
    7 posts
    Member since:
    Jan 2013

    Posted 16 Mar 2015 in reply to Nasko Link to this post

    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.
  5. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 17 Mar 2015 Link to this post

    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.

     
Back to Top