telerik:RadScheduler Header Settings

1 Answer 46 Views
Scheduler
Matthew
Top achievements
Rank 1
Iron
Matthew asked on 12 Jun 2024, 08:04 AM | edited on 12 Jun 2024, 12:06 PM

Hello,

I have a couple of questions on the header settings, I couldn't find any information in the documentation. I wondered if someone could help please.

  1. How do we remove the drop down navigation button top left of the header, which opens up the calendar? (We need the text though, e.g. Jun 2024) - And is there a way to set the alignment of the month text in the header? So that the Month text is in the center part of the header.
  2. How do we hide the "Available views" button? (header top-right)

We have managed to hide the unwanted buttons, but we still have a couple of problems we a trying to solve. Using Grid.IsVisible. The only element we've been unable to find a solution to is the calendar preview that opens when you tap on the header row. I'm curious if it's the PreviewAppointmentDialogStyle that will help us to disable this feature?

1 Answer, 1 is accepted

Sort by
1
Accepted
Didi
Telerik team
answered on 12 Jun 2024, 12:15 PM

Hello Matthew,

If you want to center the text and remove the expand options when tapping on the header, you will need to use the control template. Here is the xaml definition: 

    <ContentPage.Resources>
        <ResourceDictionary>
            <Style TargetType="Label" x:Key="HeaderLabelStyle">
                <Setter Property="TextColor" Value="#674BB2" />
                <Setter Property="FontAttributes" Value="Bold" />
                <Setter Property="HorizontalOptions" Value="Center"/>
            </Style>
            <ControlTemplate x:Key="CustomSchedulerMobileTemplate">
                <Grid RowDefinitions="Auto, *">
                    <telerik:RadBorder Style="{TemplateBinding ActualHeaderBorderStyle}">
                        <Grid ColumnDefinitions="*, Auto">
                            <Label Style="{TemplateBinding ActualHeaderLabelStyle}" />
                            <Button Grid.Column="1"
                                    Style="{TemplateBinding ActualTodayButtonStyle}"
                                    IsVisible="{TemplateBinding IsTodayButtonVisible}"
                                    Command="{TemplateBinding TodayCommand}" />
                        </Grid>
                    </telerik:RadBorder>
                    <telerik:RadSchedulerContent x:Name="PART_SchedulerContent"
                                                 Grid.Row="1"
                                                 IsClippedToBounds="True" />
                </Grid>
            </ControlTemplate>
        </ResourceDictionary>
    </ContentPage.Resources>

    <telerik:RadScheduler x:Name="scheduler" 
                           HeaderLabelStyle="{StaticResource HeaderLabelStyle}">
        <telerik:RadScheduler.ViewDefinitions>
            <telerik:MonthViewDefinition Title="Month Schedule" 
                                   HeaderTextFormat="{}{0:MMM yyyy}" />
        </telerik:RadScheduler.ViewDefinitions>
    </telerik:RadScheduler>

 

and the code for setting the template for ios and android:

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();

#if ANDROID || IOS
        this.scheduler.ControlTemplate = this.Resources["CustomSchedulerMobileTemplate"] as ControlTemplate;
#endif
    }
}

I noticed you open only forum threads. Could you please share why you do not open support tickets? Company does not guarantee timely response to Support Cases sent via Progress’ Product Forums. So in this case, I can suggest you open support ticket. Please review the Support policy page.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Matthew
Top achievements
Rank 1
Iron
commented on 12 Jun 2024, 12:22 PM

Hello Didi,

Thank you for the above. My apologies it was my misunderstanding of the Docs & support section, for future qustions I will open a support ticket :)

Tags
Scheduler
Asked by
Matthew
Top achievements
Rank 1
Iron
Answers by
Didi
Telerik team
Share this question
or