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

how to increase height automatically for upload control

5 Answers 93 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 04 Feb 2010, 01:38 AM
I am trying to increase the height of the rad silverlight upload control but it is not working. I  want the control to adjust to the number of files selected, no scroll bar. I set the height of the control to 999 but no changes are happening. any help would be greatly appreaciated.

I can control the width of the control but not the height, here is the code

<

 

UserControl xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" x:Class="RadUploadControl.MainPage"

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

 

 

mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">

 

 

 

<Grid x:Name="LayoutRoot">

 

 

 

<telerikInput:RadUpload

 

 

x:Name="RadUploadSilverlightControl"

 

 

Background="#fdeed0"

 

 

Filter="Image Files (*.gif;*.jpg;*.jpeg;*.png)|*.gif;*.jpg;*.jpeg;*.png"

 

 

FilterIndex="0"

 

 

MaxFileCount="5"

 

 

IsAutomaticUpload="false"

 

 

OverwriteExistingFiles="True"

 

 

UploadServiceUrl="~/HttpHandler/SLRadUpload.ashx"

 

 

TargetFolder="~/UserImages"

 

 

IsAppendFilesEnabled="False"

 

 

Width="540"

 

 

Height="999">

 

 

 

</telerikInput:RadUpload>

 

 

 

</Grid>

 

</

 

UserControl>

 

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 08 Feb 2010, 12:07 PM
Hello Patrick,

In order to change the height of RadUpload control you can override the MaxHeight property by setting it to Infinity: MaxHeight="Infinity"

<telerikInput:RadUpload x:Name="RadUploadSilverlightControl" Background="#fdeed0"
    Filter="Image Files (*.gif;*.jpg;*.jpeg;*.png)|*.gif;*.jpg;*.jpeg;*.png"
    FilterIndex="0" MaxFileCount="5" IsAutomaticUpload="false"
    OverwriteExistingFiles="True" UploadServiceUrl="~/HttpHandler/SLRadUpload.ashx"
    TargetFolder="~/UserImages" IsAppendFilesEnabled="False" Width="540"
    Height="999"  MaxHeight="Infinity" >
</telerikInput:RadUpload>


All the best,
Dimitrina
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Manikandan
Top achievements
Rank 1
answered on 03 Nov 2010, 06:21 AM
Hi Dimitrina ,
                     In my application i have to decrease size of upload control.Even I set height="1", it display with default height .Is there anyway to decrease size
0
Alex Fidanov
Telerik team
answered on 03 Nov 2010, 09:12 AM
Hi Manikandan,

Have you checked the MinHeight property's value? The Height property's value will be overriden by the MinHeight if it is smaller than the latter.

Best wishes,
Alex Fidanov
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
Manikandan
Top achievements
Rank 1
answered on 03 Nov 2010, 02:08 PM
Hi Alex Fidanov,
                   Yes.Now it works fine.
Is there anyway to decrese height of titlebar in upload control
0
Alex Fidanov
Telerik team
answered on 05 Nov 2010, 04:09 PM
Hello Manikandan,

Looking at the default style for the RadUpload, the header row (Row 0) has height of Auto.
<!-- Caption -->
<RowDefinition Height="auto"></RowDefinition>
 
It has no exposed or a direct way to change this. You would have to modify the control template itself and make the change there.

Sincerely yours,
Alex Fidanov
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
Tags
Upload
Asked by
Patrick
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Manikandan
Top achievements
Rank 1
Alex Fidanov
Telerik team
Share this question
or