Control Alignment in RadWindow

3 posts, 0 answers
  1. Carl Rippon
    Carl Rippon avatar
    14 posts
    Member since:
    Mar 2010

    Posted 20 Oct 2010 Link to this post

    Controls in a Grid in a RadWindow do not fill the grid cells content when the RadWindow is resized.

    In the example below, when the RadWindow is opened, the textbox is sized okay. However, when the RadWindow is resized by the user, the textbox retains it's original size rather than sizing to fit it's cell as it does in a normal silverlight page.

    Is this the expected behaviour or is this a bug?

    Example code snippets:

    Dim d As New ChildWindow1
    d.ShowDialog()


    <telerikNavigation:RadWindow x:Class="TelerikDropDown.ChildWindow1"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
        mc:Ignorable="d"
        d:DesignHeight="490" d:DesignWidth="594" Height="500" Width="500" WindowStartupLocation="CenterOwner" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
     
        <Grid Name="MyGrid" ShowGridLines="True">
            <Grid.RowDefinitions>
                <RowDefinition Height="94" />
                <RowDefinition Height="72" />
                <RowDefinition Height="243" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="219" />
                <ColumnDefinition Width="232" />
            </Grid.ColumnDefinitions>
            <TextBox Grid.Row="1" Grid.Column="1"></TextBox>
        </Grid>
    </telerikNavigation:RadWindow>



  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Oct 2010 Link to this post

    Hello Carl,

    Thank you for the code snippet.

    The Window resizes its Content also. To make it work as you expect you will have to remove the fixed dimensions of the Grid's rows and columns and define them in proportion for example:
    http://msdn.microsoft.com/en-us/library/system.windows.controls.grid.rowdefinitions%28VS.95%29.aspx

    Hope this information helps. If you need further assistance please let us know.

    Greetings,
    Konstantina
    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. Carl Rippon
    Carl Rippon avatar
    14 posts
    Member since:
    Mar 2010

    Posted 22 Oct 2010 Link to this post

    Thanks, setting the row height and width to * fixed the problem
Back to Top