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

[Solved] RadLinearGauge layout problems

2 Answers 98 Views
Gauge for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lee
Top achievements
Rank 1
Lee asked on 15 Aug 2013, 02:33 PM
I'm trying to position the RadLinearGauge as close to the bottom of the screen as I can, but it seems like there is quite of bit of padding below.  I can only get it to approximately 2/3 down the page.  The designer shows that the control occupies a lot of screen space...extending past the visible portion of the window.

I don't think I'm screwing up the layout (see code below).  I've tried manually adjusting the vertical margin of the gauge control, but that produces weird effects when the map control changes size (there's a 2nd column that pops out with the appbar... not shown).  How can I get it to take up the minimum space possible and be at the bottom.  Hardcoding the height is not a good solution for me because I want to dynamically add SegmentedLinearGaugeIndicators to the RadLinearGauge on the bottom of the main LinearBarGaugeIndicator.  They stack and the whole control needs to adjust to take up more space instead of starting to go off-screen.

Ok, hope that makes sense.  The bottom line is: how do I make the RadLinearGauge behave normally in the layout?
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
            <!--<RowDefinition Height="140" />-->
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
<Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
 
<bm:Map Grid.RowSpan="2"
                x:Name="map"
                Credentials="{key}"
                Tapped="map_Tapped"
                ViewChanged="map_ViewChanged"
                ShowScaleBar="True"
                VerticalAlignment="Stretch"
                HorizontalAlignment="Stretch"
                HomeRegion="US" Culture="en-US"
                />
 
<telerik:RadLinearGauge VerticalContentAlignment="Bottom"
                                VerticalAlignment="Bottom"
                                Margin="100,0,100,0"
                                MinValue="2"
                                MaxValue="20"
                                LabelOffset="5"
                                Padding="0"
                                telerik:RadLinearGauge.IndicatorOffset="30"
                                telerik:RadLinearGauge.Orientation="Horizontal"
                                x:Name="zoomGauge"
                                Opacity="0.7"
       Grid.Row="1" Visibility="Visible"
                                >
{everything inside}
</telerik:RadLinearGauge>
</Grid>

2 Answers, 1 is accepted

Sort by
0
Lee
Top achievements
Rank 1
answered on 15 Aug 2013, 11:50 PM
I have attached two pictures of the RadLinearGauge using the code above.  As the grid cell the control is in changes size, it changes position and gets even higher. 

0
Rosy Topchiyska
Telerik team
answered on 16 Aug 2013, 04:27 PM
Hello Lee,

Thank you for your question.

The current version of RadGauge does not specify desired size for the control -- the only way to move it to the bottom is to set its height or specify the height of its container.

Let us know if there is anything else we can assist you with.


Regards,
Rositsa Topchiyska
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Gauge for XAML
Asked by
Lee
Top achievements
Rank 1
Answers by
Lee
Top achievements
Rank 1
Rosy Topchiyska
Telerik team
Share this question
or