Setting RadScheduler View mode based on TileView state

2 posts, 0 answers
  1. Jeffrey Hare
    Jeffrey Hare avatar
    5 posts
    Member since:
    Feb 2010

    Posted 16 Jan 2011 Link to this post


    I'm using MVVM-Light..

    I have a MainView containing a RadTileView defining 3 tiles.  
    I have a MVVM SchedulerView containing the RadScheduler control.

    One of the MainView's TileViewItems contains my SchedulerView as its content.

    I'm trying to change the SchedulerViewMode to Week when the TileViewItem's state changes to maximized and Day view when state changes to minimized but am having no luck getting this to work.  I've tried several different ways make this work.

    The second problem I'm having with the RadScheduler here is being unable to set Monday as the starting day. Does this work yet in the 2010Q3 release?

    Any pointers?
    Thanks so much...
  2. Pana
    Pana avatar
    748 posts

    Posted 20 Jan 2011 Link to this post

    Hello Jeffrey Hare,

    You can use the PreviewTileStateChanged of the RadTileView like so:
        <telerik:RadTileViewItem Header="Item Alpha" />
        <telerik:RadTileViewItem Header="Item Betta" PreviewTileStateChanged="RadTileViewItem_PreviewTileStateChanged">
            <telerik:RadScheduler FirstDayOfWeek="Monday" x:Name="scheduler" />
        <telerik:RadTileViewItem Header="Item Gamma" />

    private void RadTileViewItem_PreviewTileStateChanged(object sender, Telerik.Windows.Controls.PreviewTileStateChangedEventArgs e)
                if ((e.Source as RadTileViewItem).TileState == TileViewItemState.Maximized)
                    ((sender as RadTileViewItem).ChildrenOfType<RadScheduler>()[0] as RadScheduler).ViewMode = SchedulerViewMode.Week;
                if ((e.Source as RadTileViewItem).TileState == TileViewItemState.Restored)
                    ((sender as RadTileViewItem).ChildrenOfType<RadScheduler>()[0] as RadScheduler).ViewMode = SchedulerViewMode.Month;
                if ((e.Source as RadTileViewItem).TileState == TileViewItemState.Minimized)
                    ((sender as RadTileViewItem).ChildrenOfType<RadScheduler>()[0] as RadScheduler).ViewMode = SchedulerViewMode.Day;

    The RadScheduler still experience the FirstDayOfWeek in MonthView problem. I am sorry for the inconvenience. We are working hardly on RadScheduleView control that will be much faster and easier to customize and handle than the RadScheduler. There is a pre-beta and the control is already realeased for WPF. (you can check our demos for WPF for overview). We would like to encorage you to migrate to it once it is released for Silverlight.

    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft R3 2016 release webinar banner
Back to Top