Hi, I'm creating a calendar control in xaml and ideally want to set the 'TrySetViewMode' (viewmode) in xaml but there doesnt seem a way to do this. I would like to bind it via a view model so i can switch the view to day/month etc.
For now i'm looking at just setting it int he content page code behind.
i've added the renderer as per the sample QR project.
xaml:
<Controls:DayViewCalendar
IsVisible="{Binding IsDayViewVisible}"
AppointmentsSource="{Binding Appointments}"
VerticalOptions="FillAndExpand"
SelectedDate="{Binding SelectedDate, Mode=TwoWay}"
x:Name="calendar" >
<Controls:DayViewCalendar.AppointmentsStyle>
<telerikInput:CalendarAppointmentsStyle DisplayMode="Shape" ShapeType="Ellipse" />
</Controls:DayViewCalendar.AppointmentsStyle>
</Controls:DayViewCalendar>
in the code behind i'm calling:
in contructor:
InitializeComponent();
calendar.TrySetViewMode(CalendarViewMode.Day);
But on run this still shows the month view and not day view. but if i hook up the CellTapped event and change in there is changes the view.
How can i get round this? and ideally how can I set this in XAML bound to a viewmodel?
regards
Steve