Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
xamOutlookCalendar navigation between views
posted

I have another calendar question.  How do you switch back to month view after you've switched to either day or week view by double-clicking on either the day or week header (respectively)?

I tried binding the view mode property to a property on my viewmodel but it doesn't work once I've switched to either day or week view using the header double-click.

  • 27093
    posted

    Hello,

    I am just checking if you got this worked out, or you still require any assistance, or clarification on the matter.

    If this is what you were looking for please verify the answer so it helps other users as well.

  • 27093
    posted

    Hi,

    I have been looking into this and usually there is a set of commands provided via the XamOutlookCalendarViewCommandSource  class, which by following the approach from this thread: http://es.infragistics.com/community/forums/p/77379/395191.aspx#395191 can set via the Infragistics Commanding like so:

     
    public class MyXamOutlookCalendarView : XamOutlookCalendarView
    {
        public MyXamOutlookCalendarView()
            : base()
        {
            this.Loaded += MyXamOutlookCalendarView_Loaded;    
        }
     
        TextBlock header;
     
        void MyXamOutlookCalendarView_Loaded(object sender, RoutedEventArgs e)
        {
            TextBlock tempTB = Utilities.GetDescendantFromType(thistypeof(TextBlock), falseas TextBlock;
     
            if (tempTB != null)
            {
                header = tempTB;
                XamOutlookCalendarViewCommandSource myNavigateCommand = new XamOutlookCalendarViewCommandSource();
                myNavigateCommand.CommandType = Infragistics.Controls.Schedules.XamOutlookCalendarViewCommand.SwitchToMonthView;
                myNavigateCommand.Target = this;
                
                myNavigateCommand.EventName = "MouseLeftButtonDown";
                Commanding.SetCommand(header, myNavigateCommand);
            }       
        }
    }
     

    where the TextBlock is actually the header you referred to. 

    Please let me know, if I can be of any further clarification on the matter.