or
public
class
ActivityToAppointmentConverter:IValueConverter
{
public
object
Convert(
object
value, Type targetType,
object
parameter, CultureInfo culture)
{
if
(value ==
null
|| !(value
is
Activity))
return
value;
Activity activity = (Activity) value;
List<Appointment> appointments =
new
List<Appointment>();
foreach
(Schedule schedule
in
activity.Schedules)
{
appointments.Add(
new
Appointment()
{
Subject = schedule.Activity.Name,
Body = schedule.Activity.Informations,
Start = schedule.StartDate,
End = schedule.EndDate,
});
}
return
appointments;
}
public
object
ConvertBack(
object
value, Type targetType,
object
parameter, CultureInfo culture)
{
throw
new
NotImplementedException();
}
}
<
telerik:RadChart
DataContext
=
"{Binding}"
telerik:Theming.Theme
=
"Office_Blue"
HorizontalAlignment
=
"Left"
Loaded
=
"RadChart1_Loaded"
Name
=
"radChart1"
VerticalAlignment
=
"Top"
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
ChartLegendPosition
=
"Top"
>
<!--<
telerik:ChartDefaultView.ChartTitle
>
<
telerik:ChartTitle
>CDC growth chart</
telerik:ChartTitle
>
</
telerik:ChartDefaultView.ChartTitle
>-->
<
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartLegend
x:Name
=
"PrimaryLegend"
Header
=
"Click on percentile to hide/show:"
LegendItemMarkerShape
=
"Square"
LegendItemStyle
=
"{StaticResource CustomLegendItemStyle}"
/>
</
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
EnableAnimations
=
"False"
Padding
=
"5,10,20,5"
LabelFormatBehavior
=
"None"
LegendName
=
"PrimaryLegend"
FontSize
=
"10"
>
<
telerik:ChartArea.PaletteBrushes
>
<
SolidColorBrush
Color
=
"Red"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
<
SolidColorBrush
Color
=
"LightGray"
/>
</
telerik:ChartArea.PaletteBrushes
>
<
telerik:ChartArea.AxisY
>
<
telerik:AxisY
ExtendDirection
=
"None"
/>
</
telerik:ChartArea.AxisY
>
</
telerik:ChartArea
>
</
telerik:ChartDefaultView.ChartArea
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
<
telerik:RadChart.SeriesMappings
>
.............................................................
<
telerik:RadChart
>
<Setter Property="telerik:RadDragAndDropManager.AllowDrag" Value="True" />
<telerik:RadButton Name="btApproveReport" Click="btApproveReport_Click" Margin="10,0,10,0" Width="Auto" HorizontalContentAlignment="Center" MaxHeight="30" VerticalContentAlignment="Center" > |
<telerik:RadButton.Content> |
<StackPanel Orientation="Horizontal" Margin="4 0"> |
<TextBlock Text="Approve" Foreground="DarkGreen" FontSize="12" /> |
<Image Source="pack://application:,,,/Resources/CheckMark.png" Margin="5 0 0 0" Height="16" Width="16" /> |
</StackPanel> |
</telerik:RadButton.Content> |
</telerik:RadButton> |