I added a 2nd TextBlock to DataTemplate for my RadLegeng on my RadCartesianChart:
I would like to add custom attribute to bind (Percent) to said 2nd TextBlock through binding and with named declaration of LegendItems:
Through searching, I wasn't sure how/if I can add on a new attribute to the LegendItem schema for the custom binding.
What am I missing? Any help or direction would be appreciated.
<
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
>
I would like to add custom attribute to bind (Percent) to said 2nd TextBlock through binding and with named declaration of LegendItems:
<
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
>
Through searching, I wasn't sure how/if I can add on a new attribute to the LegendItem schema for the custom binding.
What am I missing? Any help or direction would be appreciated.