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
235
Creating A Simple Week view Schedule Calendar
posted

I am new to infragistics, and I am trying to make a simple mock-up of a weekly sceduler.

I kinda got it to work but for some reason it seems like two calendar objects on top of on another. one is a day view the other a weekly view. Honestly I am not sure what I am doing wrong, but I have had a hard time finding any structured documentation or help in this task.

the Xaml is as such:   

<

 

 

Grid x:Name="LayoutRoot">

<ig:XamOutlookCalendarView x:Name="outlookCalendarView" CurrentViewMode="ScheduleViewWeek"> 

<ig:XamOutlookCalendarView.DataManager>

 

 

 

 

<ig:XamScheduleDataManager CurrentUserId="own3" x:Name="dataManagerAbout">

 

 

 

 

<ig:XamScheduleDataManager.CalendarGroups>

 

 

 

 

<ig:CalendarGroup InitialCalendarIds="own3"/>

 

 

 

 

</ig:XamScheduleDataManager.CalendarGroups>

 

 

 

 

<ig:XamScheduleDataManager.DataConnector>

 

 

 

 

<ig:ListScheduleDataConnector ResourceItemsSource="{Binding Resources}" AppointmentItemsSource="{Binding Appointments}" TaskItemsSource="{Binding Tasks}"/>

 

 

 

 

</ig:XamScheduleDataManager.DataConnector>

 

 

 

 

</ig:XamScheduleDataManager>

 

 

 

 

</ig:XamOutlookCalendarView.DataManager>

 

 

 

 

</ig:XamOutlookCalendarView>  

</Grid> 

Code Behind:    

 

InitializeComponent();

 

 

this.dataManagerAbout.ColorScheme = new IGColorScheme();

 

 

ObservableCollection<Resource> resources = new ObservableCollection<Resource>();

 

 

Resource resAmanda = new Resource() { Id = "own1", Name = "Amanda" };

resources.Add(resAmanda);

 

 

ObservableCollection<ResourceCalendar> calendars = new ObservableCollection<ResourceCalendar>();

 

 

ResourceCalendar calAmanda = new ResourceCalendar()

{

Id =

 

"cal1",

OwningResourceId =

 

"own1"

};

calendars.Add(calAmanda);

 

 

ObservableCollection<Task> tasks = new ObservableCollection<Task>();

 

 

var task = new Infragistics.Controls.Schedules.Task

{

Id =

 

"tt1",

OwningCalendarId =

 

"cal1",

OwningResourceId =

 

"own1",

Start =

 

DateTime.Today.AddHours(10).AddMinutes(12).ToUniversalTime(),

End =

 

DateTime.Today.AddHours(11).AddMinutes(42).ToUniversalTime(),

Subject =

 

"Task1 1",

Description =

 

"My first Task in XAML",

PercentComplete = 100

};

tasks.Add(task);

 

 

 

ListScheduleDataConnector dataConnector = new ListScheduleDataConnector();

dataConnector.ResourceItemsSource = resources;

dataConnector.ResourceCalendarItemsSource = calendars;

 

 

//dataConnector.AppointmentItemsSource = appointments;

dataConnector.TaskItemsSource = tasks;

 

 

XamScheduleDataManager dataManager = new XamScheduleDataManager();

dataManager.DataConnector = dataConnector;

 

 

CalendarGroupCollection calGroups = dataManager.CalendarGroups;

 

 

CalendarGroup calGroup = new CalendarGroup();

calGroup.InitialCalendarIds =

 

"own1";

calGroups.Add(calGroup);

 

 

XamOutlookCalendarView calView = new XamOutlookCalendarView();

calView.DataManager = dataManager;

 

 

this.LayoutRoot.Children.Add(calView);

Any direction on how to get this working with week views would be greatly appreciated.

Thanks,

Ben Eagle

Parents
No Data
Reply
  • 54937
    Offline posted

    I'm not sure what view you actually want but you are using ScheduleViewWeek. That is essentially the Outlook 2010 Schedule View where it shows a full calendar week worth of dates at a time; Schedule View is like Day view in that individual timeslots are displayed except they are arranged horizontallly instead of vertically and if multiple dates are displayed they are shown in a single continuous line. The other option would be DayViewWeek.

Children
No Data