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

RadUpload control size in Silverlight 5

2 Answers 106 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Alex M
Top achievements
Rank 1
Alex M asked on 04 Oct 2012, 03:02 PM
Hi,

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."  />
        </StackPanel>
        <telerikInput:RadUpload x:Name="radUpload"
                                
            OverwriteExistingFiles="True"
            UploadServiceUrl="/UploadFilesHandler.ashx"
            TargetFolder="{Binding UploadTargetFolder, Source={StaticResource so}}"
            FileUploaded="radUpload_FileUploaded"
            AllowDrop="True" Drop="radUpload_Drop"
            UploadFinished="radUpload_UploadFinished" 
            FileUploadStarting="radUpload_FileUploadStarting" 
            UploadStarted="radUpload_UploadStarted" Margin="0" Height="360" Width="640" d:LayoutOverrides="VerticalMargin"
            Style="{StaticResource FolderRadUploadStyle}" />
    </StackPanel>           
</Canvas>

2 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 09 Oct 2012, 02:52 PM
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.

0
Alex M
Top achievements
Rank 1
answered on 09 Oct 2012, 03:37 PM
It works.

Thank you so much.
Tags
Upload
Asked by
Alex M
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Alex M
Top achievements
Rank 1
Share this question
or