Hiding Upload and Cancel button

12 posts, 0 answers
  1. Jakub Wilk
    Jakub Wilk avatar
    30 posts
    Member since:
    Nov 2003

    Posted 24 Nov 2009 Link to this post

    Hi,

     

    I need to have access to UploadButton in silverlight RadUpload control.

    In my scenerio upload is started by clicking LinkButton on aspx page.

    I need to hide Upload and Cancel buttons in silverlight RadUpload control so users can only click my LinkButton.

    How can I do that?

    I try RadUpload1.FindName("uploadButton") but this returns null.

     

    Help please...

    Sebastian

  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 26 Nov 2009 Link to this post

    Hello Jakub,

    I have posted an answer to your support ticket. Have a look at it and if you have additional questions, let me know.

    Best wishes,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Paul
    Paul avatar
    113 posts
    Member since:
    May 2009

    Posted 03 Dec 2009 Link to this post

    What was the answer to this.

    I have a similar scenerio where I have a RadWindow in Silverlight similar to a new email message I want them to be able to select attachments using the upload control but do not want the upload and cancel buttons. Instead I want to fire the upload off when they click a send button.

    Is this possible.
  5. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 04 Dec 2009 Link to this post

    Hi Paul,

    Below is a copy of the original message:
     
      uploadandcancelbuttonvisibility.zip

    You can retrieve the Upload and Cancell buttons by using VisualTreeHelper:


    var root = VisualTreeHelper.GetChild(upload1, 0) as FrameworkElement;
      
    var uploadButton = root.FindName("UploadButton") as FrameworkElement;
    var cancelButton = root.FindName("CancelButton") as FrameworkElement;
      
    uploadButton.Visibility = Visibility.Collapsed;
    cancelButton.Visibility = Visibility.Collapsed;

    I am attaching my test project for further reference. Have a look at it and let me know if you have additional questions.

    Kind regards,
    Kiril Stanoev
    the Telerik team


    Sincerely yours,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. omair hussain
    omair hussain avatar
    3 posts
    Member since:
    Jan 2010

    Posted 26 Jan 2010 Link to this post

    Hello, I see that you have toggle button to hide/show upload/cancel buttons. How can I hide them without toggling any where.
    Thank you.
  7. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 29 Jan 2010 Link to this post

    Hi Omair,
     
    Thank you for your interest in the RadUpload control.

    Current release of the Radupload do not expose properties related to its buttons' visibility. Because of this you should care about them.


    Sincerely yours,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Jai
    Jai avatar
    34 posts
    Member since:
    May 2011

    Posted 12 Jul 2011 Link to this post

    Hi,

    I am using Radupload control. and i am using following assembles in my project reference
    Telerik.Windows.Controls - 2010.2.924.1040
    Telerik.Windows.Controls.Input - 2010.2.924.1040


     Do you guys have the Radupload expose properties related to buttons' visibility in above those versions of assembly? Because the same i want to hide upload and cancel button.


    Thanks,
    --Jai
  9. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 12 Jul 2011 Link to this post

    Hello Jai,

    For version 2010.2.924.1040 there is nothing exposed to control the visibility of the buttons. In 2011 release, we switched to using Visual State Manager and the visibility of the buttons is controled with visual states. You can restyle the control and modify the states.

    Best wishes,
    Alex Fidanov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  10. Jai
    Jai avatar
    34 posts
    Member since:
    May 2011

    Posted 12 Jul 2011 Link to this post

    Hi,

    Can you please provide more detail with an example that about Visual State Manager and the visibility of the buttons is controled with visual states. You can restyle the control and modify the states ?

    Thanks,
    --Jai


  11. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 14 Jul 2011 Link to this post

    Hi Jai,

    If you modify the style in Expression Blend of the RadUpload control, you will see several VisualStates in Upload's control template. For example, the state when there are selected files looks like this:



    These animations control the visibility of all the buttons in the upload control. You should set the value of the discrete frames to Collapsed on the buttons that you do not want to be visible in all of the states and apply the style to the upload control.

    Greetings,
    Alex Fidanov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  12. Mariusz
    Mariusz avatar
    24 posts
    Member since:
    Mar 2011

    Posted 30 Sep 2013 Link to this post

    Is this still the only way of managing buttons visibility?
  13. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 03 Oct 2013 Link to this post

    Hello Rafal,

    The buttons of the RadUpload control are part of its default template. Hence, in order to customize the default look of that control, you need to extract and edit the template. You can find more information about extracting template here.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner