Resize window

6 posts, 0 answers
  1. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 22 Mar 2010 Link to this post

    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
  2. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 22 Mar 2010 Link to this post

    Another image
  3. DevCraft banner
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 25 Mar 2010 Link to this post

    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.
  5. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 29 Mar 2010 Link to this post

    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
  6. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 01 Apr 2010 Link to this post

    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.
  7. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 02 Apr 2010 Link to this post

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