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

Resize window

5 Answers 83 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Grtjn
Top achievements
Rank 1
Grtjn asked on 22 Mar 2010, 12:05 PM
Hi,

My task is to make some sort of dashboard for the company. For this we use the Telerik RadControls for Silverlight.
I am good on my way, but when running the project I come across a rather annoying issue.

When minimizing the window, parts of my charts & gauges don't get shown anymore! In stead of resizing with the browsers' windows (vectorial), they remain bigsized...
Is there a way to prevent this, and let the charts & gauges minimize as well?!
Pls help me with this!

I attached some images to help understand my issue. Hope someone can help me because I have started some threads on this already...

Kind regards,

Gertjan

5 Answers, 1 is accepted

Sort by
0
Grtjn
Top achievements
Rank 1
answered on 22 Mar 2010, 12:07 PM
0
Giuseppe
Telerik team
answered on 25 Mar 2010, 03:38 PM
Hello GJ DM,

Generally in order to achieve the desired effect you should not set hardcoded dimensions (width, height) to the controls. Note, however, that the semicircle gauge is a special case and it will not look good unless certain aspect ratio is maintained (i.e. you need to set dimensions for the gauge control).

We would suggest you to handle the UserControl.SizeChanged event and update the dimensions of the semicircle gauges as appropriate there -- we have attached a sample application to get you started.


Best wishes,
Freddie
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
Grtjn
Top achievements
Rank 1
answered on 29 Mar 2010, 08:41 AM
Thanks Freddie, great reply!

Everything worked just fine and now I'm trying to add a second chart in the upper row.
For this I declared a Grid.ColumDefinition.
<Grid.ColumnDefinitions> 
            <ColumnDefinition Width="*" /> 
        </Grid.ColumnDefinitions> 

And I added some new charts so that there are 2 charts on top, and one at the bottom. In between still are the radgauges.
<Grid.RowDefinitions> 
            <RowDefinition Height="300" /> 
            <RowDefinition Height="300" /> 
            <RowDefinition Height="300" /> 
        </Grid.RowDefinitions> 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="*" /> 
        </Grid.ColumnDefinitions> 
 
        <control:RadChart x:Name="RadChart1" Grid.Row="0" Grid.Column="0"/>  
        <control:RadChart x:Name="RadChart2" Grid.Row="0" Grid.Column="1"/>  
 
        <control:RadChart x:Name="RadChart3" Grid.Row="2"/> 

When running this, the second chart is not shown on top, how is this possible?

Also I declare my radgauges in code-behind(C#), and then the method MainPage_SizeChanged produces some errors not finding the radgauges. (Error 1 The name 'rg1' does not exist in the current context C:\Users\gertjan.demeyer\Documents\Visual Studio 2008\Projects\RadGaugeTest6\RadGaugeTest6\MainPage.xaml.cs 171 13 RadGaugeTest6)

Kind regards,

Gertjan
0
Giuseppe
Telerik team
answered on 01 Apr 2010, 01:35 PM
Hello Grtjn,

If you would like to place any content in Grid.Column="1", you should declare at least two column definitions for the grid (it is zero-based index).

As for declaring gauge instances in code behind -- if the control instance is declared in XAML, behind the scenes the runtime makes sure the instance is associated and can be referenced by its x:Name in code-behind; however, if you declare the instance in code behind, the x:Name would not be associated with the actual instance and you will need to pass the desired control reference manually (via private member, method argument, etc).

Also, while we are willing to help you out with any issues related to the integration of the RadControls for Silverlight in your project, we would like to kindly remind you that you can use the official Microsoft Silverlight forums if you need general Silverlight help and solutions.


Regards,
Freddie
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
Grtjn
Top achievements
Rank 1
answered on 02 Apr 2010, 07:40 AM
Thanks for the reply.

I am going to look into this matter in the near future, because now I'm going to try and finish other parts of my project!

Kind regards,

Gertjan
Tags
Gauge
Asked by
Grtjn
Top achievements
Rank 1
Answers by
Grtjn
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or