I am attempting to set some resources to be read only in a given a view. I am doing this by creating a slot but it is making all of my resources read only. I need the end user to be able to interact with 1 of the slots.
Here is the code that I am using to set up the special slots. What else do I need to do to make this work?
The xmal for this control looks like this
Here is the code that I am using to set up the special slots. What else do I need to do to make this work?
private void CreateReadOnlySlots()
{
EventSlots = new ObservableCollection<
Slot
>();
Slot slot = new Slot() { Start = DateTime.MinValue, End = DateTime.MaxValue};
foreach (EventType e in Enum.GetValues(typeof(EventType)))
{
if (e != EventType.Macro)
{
slot.Resources.Add(new Resource(e.ToString(), "Event Type"));
}
}
slot.IsReadOnly = true;
EventSlots.Add(slot);
}
The xmal for this control looks like this
<
telerik:RadScheduleView
AppointmentsSource
=
"{Binding TimelineData, Mode=TwoWay}"
SpecialSlotsSource
=
"{Binding EventSlots}"
AppointmentEdited
=
"eventsTimeline_AppointmentEdited_1"
AppointmentSelectionChanged
=
"eventsTimeline_AppointmentSelectionChanged_1"
NavigationHeaderVisibility
=
"Collapsed"
ShowDialog
=
"RadScheduleView_ShowDialog"
ResourceTypesSource
=
"{Binding EventTypes}"
TimeRulerItemStyleSelector
=
"{StaticResource TimeRulerItemStyleSelector}"
GroupHeaderStyleSelector
=
"{StaticResource GroupHeaderStyleSelector}"
Name
=
"eventsTimeline"
VerticalAlignment
=
"Top"
>
<
telerik:RadScheduleView.AppointmentSelectionBehavior
>
<
ecu:SingleAppointmentSelectionBehavior
></
ecu:SingleAppointmentSelectionBehavior
>
</
telerik:RadScheduleView.AppointmentSelectionBehavior
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:DayViewDefinition
VisibleDays
=
"1"
MajorTickLength
=
"5min"
MinorTickLength
=
"1min"
TimerulerMajorTickStringFormat
=
"{}{0: HHmm}"
DayStartTime
=
"00:00:00"
DayEndTime
=
"3:00:00"
Orientation
=
"Horizontal"
>
</
telerik:DayViewDefinition
>
</
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:RadScheduleView.AppointmentStyleSelector
>
<
ecu:EventStyleSelector
AudioEventStyle
=
"{StaticResource AudioEvent}"
OdorEventStyle
=
"{StaticResource OdorEvent}"
LightingEventStyle
=
"{StaticResource LightingEvent}"
SmokeEventStyle
=
"{StaticResource SmokeEvent}"
/>
</
telerik:RadScheduleView.AppointmentStyleSelector
>
<
telerik:RadScheduleView.GroupDescriptionsSource
>
<
telerik:GroupDescriptionCollection
>
<
telerik:ResourceGroupDescription
ResourceType
=
"Event Types"
/>
</
telerik:GroupDescriptionCollection
>
</
telerik:RadScheduleView.GroupDescriptionsSource
>
</
telerik:RadScheduleView
>