I am trying a simple example of using resource groups as per "Programming Telerik ScheduleVIew for WPF/Silverlight (part 1) with simple mods.
I get the following error on the lines that define the groups as below:
Error 1 Only public or internal classes can be used within markup. 'Resource' type is not public or internal.
<
telerik:RadScheduleView.GroupDescriptionsSource
>
<
telerik:GroupDescriptionCollection
>
<
telerik:ResourceGroupDescription
ResourceType
=
"Activity"
/>
</
telerik:GroupDescriptionCollection
>
</
telerik:RadScheduleView.GroupDescriptionsSource
>
<
telerik:RadScheduleView.ResourceTypesSource
>
<
telerik:ResourceTypeCollection
>
<
telerik:ResourceType
Name
=
"Activity"
> (ERROR IS HERE)
<
telerik:Resource
ResourceName
=
"Morning Meds"
/>
<
telerik:Resource
ResourceName
=
"Evening Meds"
/>
</
telerik:ResourceType
>
</
telerik:ResourceTypeCollection
>
</
telerik:RadScheduleView.ResourceTypesSource
>
The control worked until I inserted the group code above.
Here is entire XAML
<
iCare:BaseUserControl
x:Class
=
"POCAClient.Views.TodaysActivities"
xmlns:icc
=
"clr-namespace:POCAClient.UserControls"
xmlns:iCare
=
"clr-namespace:POCAClient"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local
=
"clr-namespace:POCAClient.Views"
xmlns:schedule
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
mc:Ignorable
=
"d"
d:DesignHeight
=
"450"
d:DesignWidth
=
"800"
Loaded
=
"BaseUserControl_Loaded"
>
<
iCare:BaseUserControl.Resources
>
<
Style
x:Key
=
"ActivityListContainer"
TargetType
=
"{x:Type ListBoxItem}"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type ListBoxItem}"
>
<
ToggleButton
Width
=
"{Binding ActualWidth, ElementName=ItemsList}"
x:Name
=
"MainOuterToggleButton"
Height
=
"68"
IsChecked
=
"{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}"
>
<
DockPanel
DockPanel.Dock
=
"Left"
x:Name
=
"PanelListItemBG"
HorizontalAlignment
=
"Left"
Width
=
"{Binding ActualWidth, ElementName=MainOuterToggleButton}"
Height
=
"{Binding ActualHeight,ElementName=MainOuterToggleButton}"
>
<
Image
x:Name
=
"AppointmentImage"
DockPanel.Dock
=
"Left"
Margin
=
"4,4,2,3"
Style
=
"{StaticResource ListBoxItemPhotoStyle}"
Source
=
"{Binding Path=AppointmentImage}"
></
Image
>
<
TextBlock
x:Name
=
"StartTimeTextBlock"
DockPanel.Dock
=
"Top"
Margin
=
"6,4,2,3"
TextTrimming
=
"CharacterEllipsis"
Style
=
"{StaticResource ScrollingListItemHeaderStyle }"
ToolTip
=
"{Binding Path= Start, StringFormat= hh:mm tt}"
Text
=
"{Binding Path= Start, StringFormat= hh:mm tt}"
/>
<
TextBlock
x:Name
=
"SubjectTextBlock"
DockPanel.Dock
=
"Top"
Margin
=
"6,2,2,3"
TextTrimming
=
"CharacterEllipsis"
Style
=
"{StaticResource ScrollingListItemHeaderStyle}"
ToolTip
=
"{Binding Path= Subject}"
Text
=
"{Binding Path= Subject}"
/>
</
DockPanel
>
</
ToggleButton
>
<
ControlTemplate.Triggers
>
<
Trigger
Property
=
"IsSelected"
Value
=
"true"
>
<
Setter
TargetName
=
"PanelListItemBG"
Property
=
"Style"
Value
=
"{StaticResource SelectedListItemDockPanel}"
/>
<
Setter
TargetName
=
"StartTimeTextBlock"
Property
=
"Style"
Value
=
"{StaticResource SelectedListItemHeaderTextBlock}"
/>
<
Setter
TargetName
=
"SubjectTextBlock"
Property
=
"Style"
Value
=
"{StaticResource SelectedListItemSubHeaderTextBlock}"
/>
</
Trigger
>
<
Trigger
Property
=
"IsSelected"
Value
=
"false"
>
<
Setter
TargetName
=
"PanelListItemBG"
Property
=
"Style"
Value
=
"{StaticResource DeselectedListItemDockPanel}"
/>
<
Setter
TargetName
=
"StartTimeTextBlock"
Property
=
"Style"
Value
=
"{StaticResource DeselectedListItemHeaderTextBlock}"
/>
<
Setter
TargetName
=
"SubjectTextBlock"
Property
=
"Style"
Value
=
"{StaticResource DeselectedListItemSubHeaderTextBlock}"
/>
</
Trigger
>
</
ControlTemplate.Triggers
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
iCare:BaseUserControl.Resources
>
<
Border
BorderBrush
=
"{StaticResource BorderBorderBrush}"
BorderThickness
=
"1"
Background
=
"{StaticResource GridBodyBrush}"
DockPanel.Dock
=
"Top"
Margin
=
"5"
>
<
DockPanel
LastChildFill
=
"True"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"373*"
MinWidth
=
"180"
MaxWidth
=
"520"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"415*"
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"40"
></
RowDefinition
>
<
RowDefinition
Height
=
"*"
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
DockPanel
Grid.Column
=
"0"
Grid.Row
=
"0"
Grid.ColumnSpan
=
"2"
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.ColumnSpan
=
"2"
DockPanel.Dock
=
"Top"
Height
=
"30"
Margin
=
"20,5,5,5"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
>
<
TextBlock
Style
=
"{StaticResource PageHeaderTextBlockStyle}"
Grid.ColumnSpan
=
"2"
FontSize
=
"24"
Foreground
=
"#202C21"
Text
=
"Today is: "
></
TextBlock
>
<
TextBlock
x:Name
=
"txtTodayDate"
Style
=
"{StaticResource PageHeaderTextBlockStyle}"
Grid.ColumnSpan
=
"2"
Text
=
"df sdfns dnfnsdf sdfsdf nsdfdf nsdfnsdf sdf"
FontSize
=
"24"
Foreground
=
"#202C21"
DockPanel.Dock
=
"Top"
/>
</
StackPanel
>
</
DockPanel
>
<
DockPanel
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
Margin
=
"0,0,415,0"
HorizontalAlignment
=
"Left"
>
<
telerik:RadScheduleView
Name
=
"radScheduleViewToday"
Width
=
"630"
AppointmentsSource
=
"{Binding Appointments}"
>
<
telerik:RadScheduleView.GroupDescriptionsSource
>
<
telerik:GroupDescriptionCollection
>
<
telerik:ResourceGroupDescription
ResourceType
=
"Activity"
/>
</
telerik:GroupDescriptionCollection
>
</
telerik:RadScheduleView.GroupDescriptionsSource
>
<
telerik:RadScheduleView.ResourceTypesSource
>
<
telerik:ResourceTypeCollection
>
<
telerik:ResourceType
Name
=
"Activity"
>
<
telerik:Resource
ResourceName
=
"Morning Meds"
/>
<
telerik:Resource
ResourceName
=
"Evening Meds"
/>
</
telerik:ResourceType
>
</
telerik:ResourceTypeCollection
>
</
telerik:RadScheduleView.ResourceTypesSource
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:TimelineViewDefinition
MinorTickLength
=
"1h"
MajorTickLength
=
"2h"
VisibleDays
=
"1"
/>
</
telerik:RadScheduleView.ViewDefinitions
>
</
telerik:RadScheduleView
>
</
DockPanel
>
<
DockPanel
Grid.Column
=
"1"
Grid.Row
=
"1"
Margin
=
"42,0,0,0"
>
<
Border
BorderBrush
=
"{StaticResource GridBorderBrush}"
BorderThickness
=
"2"
Margin
=
"3"
Background
=
"{StaticResource GridBodyBrush}"
Width
=
"384"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
DockPanel
LastChildFill
=
"True"
Margin
=
"10,15,0,30"
DockPanel.Dock
=
"Left"
>
<
TextBlock
x:Name
=
"txtNotesHeader"
DockPanel.Dock
=
"Top"
Margin
=
"3"
Foreground
=
"#0C4F95"
FontSize
=
"17"
FontWeight
=
"Bold"
Text
=
"Notes"
TextWrapping
=
"WrapWithOverflow"
/>
<
ScrollViewer
DockPanel.Dock
=
"Right"
Style
=
"{StaticResource EasyAccessScrollViewer}"
HorizontalScrollBarVisibility
=
"Disabled"
VerticalScrollBarVisibility
=
"Auto"
>
<
TextBlock
x:Name
=
"txtNotes"
Style
=
"{StaticResource TextBlockStyle}"
Margin
=
"3,0,10,0"
TextWrapping
=
"WrapWithOverflow"
></
TextBlock
>
</
ScrollViewer
>
</
DockPanel
>
</
Grid
>
</
Border
>
</
DockPanel
>
</
Grid
>
</
DockPanel
>
</
Border
>
</
iCare:BaseUserControl
>