We are creating a linear gauge, it needs to show some extra markers (on-demand based on user's setting, binding to "Markers").
We tried to add <telerik:LinearScale.CustomItems>, but we can not set up the databinding... and we tried to add
BTW: as the code shows below, the gauge shows "CurrentFrameNumber" on the top of the gauge, and we would like the extra markers appear on the bottom of the gauge.
Could you please help?
Thanks.
We tried to add <telerik:LinearScale.CustomItems>, but we can not set up the databinding... and we tried to add
CustomItems
=
"{Binding Markers}"
CustomItemTemplate
=
"{StaticResource CustomItemTemplate}"
but we cannot make it work.BTW: as the code shows below, the gauge shows "CurrentFrameNumber" on the top of the gauge, and we would like the extra markers appear on the bottom of the gauge.
Could you please help?
Thanks.
<
telerik:RadHorizontalLinearGauge
Grid.Row
=
"1"
Grid.Column
=
"0"
Grid.ColumnSpan
=
"2"
x:Name
=
"TimeGauge"
HorizontalContentAlignment
=
"Stretch"
VerticalContentAlignment
=
"Stretch"
Margin
=
"0"
OuterBackground
=
"#00000000"
OuterBorderThickness
=
"0"
Background
=
"#00000000"
BorderBrush
=
"#00000000"
>
<
telerik:LinearScale
x:Name
=
"TimeScale"
Min
=
"{Binding Min}"
Max
=
"{Binding Max}"
IsInteractive
=
"True"
RelativeX
=
"0.04"
RelativeWidth
=
"0.92"
RelativeY
=
"0.6"
FontSize
=
"10"
Fill
=
"#4D0000F9"
CustomItems
=
"{Binding Markers}"
CustomItemTemplate
=
"{StaticResource CustomItemTemplate}"
>
<
telerik:LinearScale.Indicators
>
<
telerik:BarIndicator
x:Name
=
"TrackBar"
Value
=
"{Binding CurrentFrameNumber, Mode=TwoWay}"
IsAnimated
=
"False"
Background
=
"#FF00C500"
/>
<
telerik:Marker
x:Name
=
"CurrentFrameMarker"
Value
=
"{Binding CurrentFrameNumber, Mode=TwoWay}"
telerik:ScaleObject.Offset
=
"0.10"
telerik:LinearScale.RotateForVertical
=
"True"
telerik:ScaleObject.RelativeWidth
=
"0.04"
telerik:ScaleObject.RelativeHeight
=
"0.30"
telerik:ScaleObject.Location
=
"Outside"
>
<
telerik:Marker.Template
>
<
ControlTemplate
TargetType
=
"{x:Type telerik:Marker}"
>
<
Grid
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
Polygon
Points
=
"0,0 0,0.7 0.5,1 1,0.7 1,0"
Stretch
=
"Fill"
Fill
=
"Yellow"
Stroke
=
"Green"
StrokeThickness
=
"2"
/>
</
Grid
>
</
ControlTemplate
>
</
telerik:Marker.Template
>
</
telerik:Marker
>
</
telerik:LinearScale.Indicators
>
</
telerik:LinearScale
>
</
telerik:RadHorizontalLinearGauge
>