Set fixed calendar height when agenda is shown

Hi,

I'm trying to visualize a sfCalendar component in MonthView mode with only one week shown, with the agenda always shown. 

I'd like to have a fixed height for the calendar part, and the underlying Agenda should fill all the space below. I cannot find any way to set that height. As a workaround I set the AgendaViewHeight parameter, but I'd like to control the calendar part height instead.

Is this possible?

Here's my actual code

<Grid>
<graphics:SfGradientView Style="{StaticResource BrandGradientStyle}" />
<StackLayout VerticalOptions="FillAndExpand"
 Spacing="0"
                     WidthRequest="{OnPlatform Default='-1',
                                              UWP='350'}"
                     IsVisible="{Binding UtenteAbilitato}"
                     Margin="5,0">
<Grid RowDefinitions="Auto,Auto,*"
                  RowSpacing="0"
                  VerticalOptions="FillAndExpand">
                <comboBox:SfComboBox
                        ShowClearButton="False"
                        TextSize="20"
                        DataSource="{Binding ListaPercorsi}"
                        SelectedItem="{Binding PercorsoSelezionato, Mode=TwoWay}"
                        SelectedIndex="{Binding PercorsoSelezionatoIndex}"
                        HeightRequest="45"
                        DropDownBackgroundColor="#10ffffff"
                        DropDownTextColor="{DynamicResource Gray-700}"
                        MultiSelectMode="None"
                        FontFamily="Montserrat-SemiBold"
                        DisplayMemberPath="Descrizione"
                        Style="{StaticResource SimpleComboBoxStyle}"
                        Margin="{core:OnPlatformOrientationThickness
                        PhonePortrait='15,12,15,12',
                                                                 PhoneLandscape='150,32',
                                                                 TabletPortrait='200,50',
                                                                 TabletLandscape='300,50',
                                                                 Desktop='30'}">


                    </comboBox:SfComboBox>
                    <xForms:SfCalendar ViewMode="MonthView"
                                       ShowInlineEvents="True"
                                       IsVisible="{Binding IsLoading, Converter={StaticResource InverseBoolConverter}}"
                                       InlineViewMode="Agenda"
                                       EnableDatesInPast="false"
                                       NumberOfWeeksInView="1"
                                       HeaderHeight="35"
                                       DataSource="{Binding Occupazioni}"
                                       MaximumEventIndicatorCount="0"
                                       SelectedDate="{Binding DataSelezionata}"
                                       VerticalOptions="Start"
                                       Grid.Row="1"
                                       SelectionChangedCommand="{Binding DataCambiataCommand}"
                                       FirstDayofWeek="1">
                        <xForms:SfCalendar.MonthViewSettings>
                            <xForms:MonthViewSettings
                                <xForms:MonthViewSettings.InlineItemTemplate>
                                    <DataTemplate>
                                        <Grid ColumnDefinitions="40, *">
                                            <Label Text="{Binding StartTime, StringFormat='{}{0:HH:mm}'}"
                                                   TextColor="{DynamicResource Gray-White}"
                                                   Grid.Column="0"
                                                   VerticalOptions="Center"
                                                   VerticalTextAlignment="Center"
                                                   Style="{StaticResource SimpleLabelStyle}"></Label>
                                            <Button Grid.Column="1"
                                                    BorderColor="White"
                                                    BorderWidth="1"
                                                    BackgroundColor="{Binding Color}"
                                                    Text="{Binding Subject}"
                                                    TextColor="White"
                                                    FontFamily="Montserrat-SemiBold"/>
                                        </Grid>
                                    </DataTemplate>
                                </xForms:MonthViewSettings.InlineItemTemplate>
                            </xForms:MonthViewSettings>
                        </xForms:SfCalendar.MonthViewSettings>
                    </xForms:SfCalendar>
                    <ActivityIndicator IsVisible="{Binding IsLoading}"
                                       IsRunning="True"
                                       HeightRequest="150"
                                       VerticalOptions="Center"
                                       Color="{DynamicResource Gray-300}"
                                       Grid.Row="2"></ActivityIndicator>
                </Grid>


            </StackLayout>
        </Grid>


2 Replies

SS SaiGanesh Sakthivel Syncfusion Team March 14, 2022 02:29 PM UTC

Hi Juri, 
 
#Regarding Set fixed calendar height when agenda is shown  
Currently, we are checking the reported query from our end. we will update you on the further details on 16 March, 2022. We appreciate the patience until then. 
 
Regards,
SaiGanesh Sakthivel
 



SS SaiGanesh Sakthivel Syncfusion Team March 16, 2022 03:34 PM UTC

Hi Juri, 
 
As per the implementation of SfCalendar, there is no setting available to set the height of the calendar part alone. A calendar will be rendered according to the height of the calendar or height of the parent view. When the agenda view is shown, the calendar part will render with the remaining height in the view by reducing the AgendaViewHeight. To reduce or increase the calendar part, increase or decrease the AgendaViewHeight property in SfCalendar. It is an expected behaviour of SfCalendar. 
Regards,
SaiGanesh Sakthivel
 


Loader.
Up arrow icon