This is a migrated thread and some comments may be shown as answers.

Adding a label to the center of the gauge

4 Answers 69 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
madladuk
Top achievements
Rank 2
madladuk asked on 07 Jul 2010, 12:09 PM
I'm trying to add a label into the center of the gauge but with no luck. I took a quick look at your samples and have the following;

 <Grid x:Name="LayoutRoot" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Top">  
        <Grid.RowDefinitions> 
            <RowDefinition /> 
        </Grid.RowDefinitions> 
          
          
        <TextBlock Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Center" 
                            Foreground="Black" FontFamily="CourierNew">  
                        x $10,000  
        </TextBlock> 
 
    </Grid> 

The gauge is being created from the code-behind;

Grid.SetRow(radGauge, 0);  
 
                LayoutRoot.Children.Add(radGauge); 

It appears as if the gauge is going over the text and therefore not showing, please can you advise.

Thanks
P

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 07 Jul 2010, 06:41 PM
Hello Paul,

Yes, the gauge appears over the text for the sample code you've sent.
You can use the Insert method to insert the gauge before the text.
LayoutRoot.Children.Insert(0, radGauge);

Kind regards,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
madladuk
Top achievements
Rank 2
answered on 12 Jul 2010, 11:07 AM
Hi. Tried this and the label is still over-written by the gauge component.

Regards
P
0
Andrey
Telerik team
answered on 12 Jul 2010, 06:25 PM
Hello madladuk,

We cannot reproduce this issue using RadControls for Silverlight 4 version 2010.1 603.
Could you, please, send to us a small solution which reproduces this problem?

All the best,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Michael Wasmer
Top achievements
Rank 1
answered on 04 Oct 2010, 05:02 PM
another way to handle this is to put a border with a textblock and set the zindex of the border higher than the gauage. an example of how i accomplished this is below.

<Border BorderThickness="1" Canvas.ZIndex="1" BorderBrush="Black" Width="40" Height="20" Margin="0,50,0,0" Background="#FFCCCACA">
    <TextBlock x:Name="txtServiceGuageValue" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="9.333" FontWeight="Bold">100.00</TextBlock>
   </Border>
    <control:RadGauge x:Name="radGauge" Width="177" Height="108">
Tags
Gauge
Asked by
madladuk
Top achievements
Rank 2
Answers by
Andrey
Telerik team
madladuk
Top achievements
Rank 2
Michael Wasmer
Top achievements
Rank 1
Share this question
or