gauge value

Forum for Arction Gauges users. Share your problems, questions, and improvement suggestions here. As Gauges is FREE, Arction monitors this forum occasionally, but does not take any obligation to answer the posts.

Moderator: Arction_LasseP

Post Reply
mr.almasli
Posts: 1
Joined: Thu Jul 12, 2018 5:45 pm

gauge value

Post by mr.almasli » Thu Jul 12, 2018 6:00 pm

please help me ! i can't use set value and other value element .can you send me any example and how i set value as video -https://www.youtube.com/watch?v=hFEC8_c ... 6068612330

User avatar
ArctionNikolai
Posts: 38
Joined: Fri Feb 05, 2016 11:37 am
Location: Finland
Contact:

Re: gauge value

Post by ArctionNikolai » Fri Jul 13, 2018 11:46 am

Dear Mr.Almasli,
Thank you for your message. Were you able to download the source code of our Gauges Demo Application?
Did you tried to use examples' code?

You can take a look to ExamplePressureGauge. In this example we use Binding to the value of a Slider UI control.

Code: Select all

<agc:Gauge Name="PresureGauge" ArcPadding="5" LightDirection="180" Fill="White" StrokeThickness="12" Height="400" Width="Auto">
                <agc:Gauge.Stroke>
                    <RadialGradientBrush>
                        <GradientStop Color="#FF3C3C3C" Offset="0.013"/>
                        <GradientStop Color="White" Offset="0.979"/>
                        <GradientStop Color="#FF3C3C3C" Offset="0.946"/>
                    </RadialGradientBrush>
                </agc:Gauge.Stroke>
                <agc:Gauge.SecondaryScales>
                    <agc:Scale Name="NormalZone" RangeEnd="6.99" RangeBegin="0" AngleEnd="140" AngleBegin="270" StrokeThickness="0" Stroke="#7F000000" Fill="#CC00FF00"/>
                    <agc:Scale Name="YellowZone" RangeEnd="9.49" RangeBegin="5" Fill="#CCFFFF00" AngleEnd="30" AngleBegin="140" StrokeThickness="0" Stroke="#7F000000"/>
                    <agc:Scale Name="CriticalZone" RangeEnd="12" RangeBegin="9.5" Fill="#CCFF0000" AngleBegin="30" AngleEnd="-30" StrokeThickness="0" Stroke="#7F000000"/>
                    <agc:Scale Name="Mask" RangeEnd="12" TertiaryTickCount="1" ValueFormat="" MajorTickCount="13" AngleBegin="271" AngleEnd="-32" ArcPadding="10" ValueIndicatorDistanceType="Absolute" ValueIndicatorAngle="126" ValueIndicatorDistance="-140" Value="{Binding Value, ElementName=slider}" Fill="White" ArcStrokeThickness="2" RadiusFactor="0.75" ArcStroke="Black" MinorTickCount="0"/>

                </agc:Gauge.SecondaryScales>
                <agc:Gauge.PrimaryScale>
                    <agc:Scale LabelDistanceType="Absolute"
                               Value="{Binding Value, ElementName=slider}"
                               LabelAngle="-68"
                               LabelDistance="122"
                               ValueFormat="F2"
                               ValueIndicatorDistanceType="Absolute"
                               ValueIndicatorDistance="-140"
                               ValueIndicatorAngle="126"
                               RangeEnd="12"
                               TertiaryTickCount="1"
                               MinorTickCount="8" MajorTickCount="0" ArcStrokeThickness="0" ArcStroke="{x:Null}" DialColor1="#7FFF0000">
                        <agc:Scale.Label>
                            <TextBlock><Run Text="Bar"/></TextBlock>
                        </agc:Scale.Label>
                    </agc:Scale>
                </agc:Gauge.PrimaryScale>
            </agc:Gauge>

Code: Select all

<Slider x:Name="slider"
                        Minimum="{Binding PrimaryScale.RangeBegin, ElementName=PresureGauge}"
                        Maximum="{Binding PrimaryScale.RangeEnd, ElementName=PresureGauge}" 
                	Value="1.38" 
                        VerticalAlignment="Center" 
                        Margin="238,0,2,0" 
                        Height="18" 
                        Width="160" 
                        HorizontalAlignment="Center"/>
With kind regards,
Nikolai
Nikolai Arsenov
Software developer
Arction Ltd
Microkatu 1, 70210 Kuopio, Finland

Post Reply