RadUpload control size in Silverlight 5

3 posts, 1 answers
  1. Alex M
    Alex M avatar
    3 posts
    Member since:
    Apr 2010

    Posted 04 Oct 2012 Link to this post


    After switching to Silverlight 5 and RadControls for SL 5 we got a small issue.
    The layout of our window for upload files is changed. See pictures:
    • bad.png - Silverlight 5
    • good.png - Silverlight 4

    The code is the same but the results are different..
    I can't change the size of control. The render result is the same on any size.

    The xaml code is below.
    <Canvas x:Name="LayoutRoot" Background="White">
        <StackPanel Orientation="Vertical">
            <StackPanel x:Name="uploadCommentStackPanel" Orientation="Horizontal" Margin="0,5,0,5">
                <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Text="Upload Comment:"/>
                <TextBox Margin="5,0,0,0" x:Name="uploadCommentTextBox" Width="525" MaxLength="1024"
                         Text="Uploaded to folder[userx]" ToolTipService.ToolTip="This comment is set for all uploaded files."  />
            <telerikInput:RadUpload x:Name="radUpload"
                TargetFolder="{Binding UploadTargetFolder, Source={StaticResource so}}"
                AllowDrop="True" Drop="radUpload_Drop"
                UploadStarted="radUpload_UploadStarted" Margin="0" Height="360" Width="640" d:LayoutOverrides="VerticalMargin"
                Style="{StaticResource FolderRadUploadStyle}" />

  2. Answer
    Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 09 Oct 2012 Link to this post

    Hello Alex,

    This layout is caused by the default style settings of the RadUpload control. It sets the MaxWidth settings to 400px. And this is why in case you need to expand the width of the control to a larger value, you need to change that settings to a larger value.
    <telerikInput:RadUpload x:Name="radUpload" MaxWidth="1800".../>

     Please give it a try and let us know if it helps.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Alex M
    Alex M avatar
    3 posts
    Member since:
    Apr 2010

    Posted 09 Oct 2012 Link to this post

    It works.

    Thank you so much.
Back to Top