Adding a label to the center of the gauge

5 posts, 0 answers
  1. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 07 Jul 2010 Link to this post

    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
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 07 Jul 2010 Link to this post

    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
  3. DevCraft banner
  4. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 12 Jul 2010 Link to this post

    Hi. Tried this and the label is still over-written by the gauge component.

    Regards
    P
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 12 Jul 2010 Link to this post

    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
  6. Michael Wasmer
    Michael Wasmer avatar
    2 posts
    Member since:
    Mar 2010

    Posted 04 Oct 2010 Link to this post

    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">
Back to Top
DevCraft banner