<
Window
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:d
=
"http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc
=
"http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable
=
"d"
x:Class
=
"NoXamlTest.MainWindow"
Title
=
"MainWindow"
Height
=
"274"
Width
=
"426"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
Button
Width
=
"75"
Height
=
"23"
Click
=
"Button_Click"
Content
=
"Default"
/>
<!-- NE quadrant -->
<
telerik:RadQuadrantNEGauge
Grid.Row
=
"1"
>
<
telerik:QuadrantNEScale
Min
=
"1"
Max
=
"5"
MajorTicks
=
"4"
MiddleTicks
=
"1"
>
<
telerik:QuadrantNEScale.Indicators
>
<
telerik:Needle
Value
=
"3.28"
OffPosition
=
"0"
/>
<
telerik:Pinpoint
/>
</
telerik:QuadrantNEScale.Indicators
>
<
telerik:GaugeRange
x:Name
=
"MyGaugeRange"
Min
=
"1"
Max
=
"5"
StartWidth
=
".05"
EndWidth
=
".05"
Stroke
=
"Black"
StrokeThickness
=
"1"
telerik:ScaleObject.Location
=
"Inside"
telerik:ScaleObject.Offset
=
"0.15*"
>
<
telerik:GaugeRange.Background
>
<
LinearGradientBrush
StartPoint
=
"0,0"
EndPoint
=
"1,0"
>
<
GradientStop
Offset
=
"0"
Color
=
"Green"
/>
<
GradientStop
Offset
=
"1"
Color
=
"Red"
/>
</
LinearGradientBrush
>
</
telerik:GaugeRange.Background
>
</
telerik:GaugeRange
>
</
telerik:QuadrantNEScale
>
</
telerik:RadQuadrantNEGauge
>
</
Grid
>
</
Window
>
In case these things are important, there are some oddities in Expression Blend (2012) when changing the ScaleObject properties: Blend does not recognize the change until the project is built, using the ScaleObject properties causes Blend to not display the indicator. Here is the designer in Blend (after the project is built) where you can see that the range is in the expected location:
Here is the windows actually running (where the indicator is visible).
My real issue is that I have to set those ScaleObject properties in code. So, I remove the xaml above that sets the ScaleObject properties & instead set them in code when the button at the top of the window is clicked. That code is:
private
void
Button_Click(
object
sender, RoutedEventArgs e)
{
GaugeRange range = FindName(
"MyGaugeRange"
)
as
GaugeRange;
range.SetValue(ScaleObject.LocationProperty, ScaleObjectLocation.Inside);
range.SetValue(ScaleObject.OffsetProperty,
new
GaugeMeasure( 0.15, GridUnitType.Star));
}
After the last update I did for my telerik products I started getting error reports from my user base. I didn't change anything to do with the carousel on my last release. I am attaching the error in a png file, let me know if anyone has any ideas. I have also had a long standing issue with the carousel where I change the selected item from code behind and if I have more than 5 items in the carousel, the third item will be brought to the top instead of the selected item. I do have code that I use to make sure that the items stay in view. But I can't see why the carousel is changing position, I had to set my selected item to null and then to the value I wanted it to be. So the carousel changes to the third item in the list then after setting it to null and back to my item it will select it properly.
Thank you