or
<
telerik:RadLegend.ItemTemplate
>
<
DataTemplate
>
<
Border
BorderThickness
=
"0"
BorderBrush
=
"Transparent"
Margin
=
"10,2,5,0"
Padding
=
"0,4,0,0"
>
<
Grid
>
<
TextBlock
Text
=
"{Binding Percent}"
Foreground
=
"White"
Margin
=
"0,0,0,0"
FontSize
=
"13"
FontWeight
=
"Normal"
Width
=
"35"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
/>
<
TextBlock
Text
=
"{Binding Title}"
Foreground
=
"White"
Margin
=
"18,0,0,0"
FontSize
=
"13"
FontWeight
=
"Normal"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
/>
<
Path
Width
=
"auto"
Height
=
"auto"
Stroke
=
"White"
StrokeThickness
=
"1"
Fill
=
"{Binding MarkerFill}"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
>
<
Path.Data
>
<
Binding
Path
=
"ActualMarkerGeometry"
RelativeSource
=
"{RelativeSource AncestorType=telerik:LegendItemControl}"
/>
</
Path.Data
>
</
Path
>
</
Grid
>
</
Border
>
</
DataTemplate
>
</
telerik:RadLegend.ItemTemplate
>
<
telerik:RadLegend.Items
>
<
telerik:LegendItemCollection
>
<
telerik:LegendItem
MarkerFill
=
"#FFF0F8FF"
MarkerStroke
=
"White"
Title
=
"< 5"
x:Name
=
"rl_0to5s"
/>
<
telerik:LegendItem
MarkerFill
=
"#FF00B000"
MarkerStroke
=
"White"
Title
=
"6 - 10"
x:Name
=
"rl_6to10s"
/>
<
telerik:LegendItem
MarkerFill
=
"#FFFFFF00"
MarkerStroke
=
"White"
Title
=
"11 - 20"
x:Name
=
"rl_11to20s"
/>
<
telerik:LegendItem
MarkerFill
=
"#FFFFA83E"
MarkerStroke
=
"White"
Title
=
"21 - 30"
x:Name
=
"rl_21to30s"
/>
<
telerik:LegendItem
MarkerFill
=
"#FFFF2020"
MarkerStroke
=
"White"
Title="31 >" x:Name="rl_31s" />
</
telerik:LegendItemCollection
>
</
telerik:RadLegend.Items
>
<
UserControl.Resources
>
<
telerik:RadContextMenu
x:Key
=
"LimbContextMenu"
DataContext
=
"{Binding SelectedLimb}"
>
<
telerik:RadMenuItem
Header
=
"Expand"
Command
=
"{Binding ExpandItemCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Expand to book"
Command
=
"{Binding ExpandToBookCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Collapse"
Command
=
"{Binding CollapseItemCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Collapse all"
Command
=
"{Binding CollapseAllCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Jump to home"
Command
=
"{Binding JumpToHomeCommand}"
Visibility
=
"{Binding JumpToHomeCommand.IsSupported, Converter={StaticResource BooleanToVisibilityConverter}}"
/>
</
telerik:RadContextMenu
>
</
UserControl.Resources
>
<
UserControl.Resources
>
<
telerik:RadContextMenu
x:Key
=
"LimbContextMenu"
>
<
telerik:RadContextMenu
DataContext
=
"{Binding SelectedLimb}"
>
<
telerik:RadMenuItem
Header
=
"Expand"
Command
=
"{Binding ExpandItemCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Expand to book"
Command
=
"{Binding ExpandToBookCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Collapse"
Command
=
"{Binding CollapseItemCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Collapse all"
Command
=
"{Binding CollapseAllCommand}"
/>
<
telerik:RadMenuItem
Header
=
"Jump to home"
Command
=
"{Binding JumpToHomeCommand}"
Visibility
=
"{Binding JumpToHomeCommand.IsSupported, Converter={StaticResource BooleanToVisibilityConverter}}"
/>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu
>
</
UserControl.Resources
>
var outConnector =
new
InOutConnector() { Offset =
new
Point(0.5, 1), Direction = InOutConnector.eDirection.drOut, Name=
"StartConncetor"
};
NewShape.Connectors.Add(outConnector);
NewShape.UseDefaultConnectors =
false
;
<
chartView:BarSeries.TrackBallInfoTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding DataPoint.Value}"
FontWeight
=
"Bold"
/>
<
TextBlock
Text
=
":"
FontWeight
=
"Bold"
/>
<
TextBlock
Text
=
"{Binding DataPoint.DataItem.Name}"
FontWeight
=
"Bold"
/>
</
StackPanel
>
</
DataTemplate
>
</
chartView:BarSeries.TrackBallInfoTemplate
>
public
class
CategoryData
{
public
string
Name {
get
;
set
; }
public
double
Value {
get
;
set
; }
public
string
Category {
get
;
set
; }
}