Detail WeekView for Calendar

4 posts, 2 answers
  1. Roshan
    Roshan avatar
    20 posts
    Member since:
    Apr 2012

    Posted 23 Aug Link to this post

    Hi,

    I am evaluating xamarin UI. Using calendar example provided I came across that week view shows a week on top of the calendar and the rest is jst blank. How can we show a grid or list with the appointments for the week in this area. 

    Thank you in advance

  2. Answer
    Ves
    Admin
    Ves avatar
    2914 posts

    Posted 28 Aug Link to this post

    Hello,

    This functionality is only available when CalendarViewMode is 'Day'. It is actually  implemented as a timeline. For all other view modes, you will need to manually add and populate the desired listview.

    In addition, I should note that your screenshot depicts a problem -- the dates are not stretched downwards to the end of the control. We have scheduled this to be fixed for the next release, expected in September. So, you will be able to set the HeightRequest property and in week mode, there will be no space beneath the dates, so you will have enough real estate to add that list.

    Best regards,
    Ves
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Roshan
    Roshan avatar
    20 posts
    Member since:
    Apr 2012

    Posted 18 Sep Link to this post

    hi, 

    I added a listview to show appointments. That makes the week view shrinked. And leaves empty space between weekview and the list. I tried with a stackpanel, grid but that makes week view invisible. What would be the solution here? following is my code

    <telerikDataControls:RadCalendar x:Name="Calendar"></telerikDataControls:RadCalendar
    <telerikDataControls:RadListView Grid.Row="1" x:Name="listView">          
                <telerikDataControls:RadListView.ItemTemplate>
                    <DataTemplate>
                        <telerikListView:ListViewTemplateCell>
                            <telerikListView:ListViewTemplateCell.View>
                                <StackLayout>
                                        <template:AppointmentListItemTemplate/>
                                </StackLayout>
                            </telerikListView:ListViewTemplateCell.View>
                        </telerikListView:ListViewTemplateCell>
                    </DataTemplate>
                </telerikDataControls:RadListView.ItemTemplate>
            </telerikDataControls:RadListView>

     

     

    Thank you in advance.

     

  4. Answer
    Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    419 posts

    Posted 18 Sep Link to this post

    Hi Roshan,

    Xamarin.Forms can be a little difficult when it comes to layout positioning, It may take some experimentation to get the exact results you want.

    Start here and then set Row Height to get the proportion you'd like.

    <Grid>
        <Grid.RowDefinitions>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
     
            <input:RadCalendar x:Name="Calendar" VerticalOptions="Fill"/>
     
            <dataControls:RadListView Grid.Row="1" x:Name="listView" VerticalOptions="Fill"/>
     
        </Grid>


    One note: avoid putting a control that uses UI virtualization in a StackLayout (or Auto height RowDefinition) because they measure infinity. If you need to, make sure you set an explicit HeightRequest to the control.

    Regards,
    Lance | Tech Support Engineer, Sr.
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top