Hi,
I have the following Calendar business object :
public class Calendar
{
public int CalendarID { get; set; }
public DateTime StartDateTime { get; set; }
public DateTime EndDateTime { get; set; }
public string Subject { get; set; }
public string Description { get; set; }
public string InternalDescription { get; set; }
public string Location { get; set; }
public string Pattern { get; set; }
}
I have also a CalendarViewModel that contains an ObservableCollection<Calendar> called CallendarCollection. I fill this collection with some data from a webservice and bind it to the scheduler:
<Window.Resources>
<viewModel:CalendarViewModel x:Key="_ds" />
</Window.Resources>
<c1sched:C1Scheduler x:Name="Scheduler1" EditAppointmentTemplate="{StaticResource myEditAppointmentTemplate}" Theme="{DynamicResource {ComponentResourceKey ResourceId=Dusk.Green, TypeInTargetAssembly={x:Type c1sched:C1Scheduler}}}" Style="{DynamicResource {ComponentResourceKey ResourceId=MonthStyle, TypeInTargetAssembly={x:Type c1sched:C1Scheduler}}}">
<c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.DataSource" Value="{Binding Source={StaticResource _ds}, Path=CallendarCollection, Mode=TwoWay}" />
<c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.Mappings.Body.MappingName" Value="Description"/>
<c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.Mappings.End.MappingName" Value="EndDateTime"/>
<c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.Mappings.Start.MappingName" Value="StartDateTime"/>
<c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.Mappings.Subject.MappingName" Value="Subject"/>
<c1sched:NestedPropertySetter PropertyName="DataStorage.AppointmentStorage.Mappings.Location.MappingName" Value="Location"/>
</c1sched:C1Scheduler>
The recurrence pattern is a custom format like "FREQ=WEEKLY;BYDAY=3;" and other formats for other kinds of recurrences.
Here are my questions:
1. How can I convert my custom recurrence pattern string to C1Scheduller RecurrencePattern class? I want some kind of binding between the scheduler appointmnet and my recurrence pattern string.
2. I want to bind the InternalDescription to a control in the EditDialog of an appointment. Is this possible? Because my InternalDescription has no correspondence to a filed in the Appointment class.
Thank you kindly.