how to increase height automatically for upload control

6 posts, 0 answers
  1. Patrick
    Patrick avatar
    17 posts
    Member since:
    May 2009

    Posted 03 Feb 2010 Link to this post

    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>

     

  2. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 08 Feb 2010 Link to this post

    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.
  3. DevCraft banner
  4. Manikandan
    Manikandan avatar
    3 posts
    Member since:
    Nov 2010

    Posted 03 Nov 2010 Link to this post

    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
  5. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 03 Nov 2010 Link to this post

    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
  6. Manikandan
    Manikandan avatar
    3 posts
    Member since:
    Nov 2010

    Posted 03 Nov 2010 Link to this post

    Hi Alex Fidanov,
                       Yes.Now it works fine.
    Is there anyway to decrese height of titlebar in upload control
  7. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 05 Nov 2010 Link to this post

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