How to set the initial Browse button state

3 posts, 0 answers
  1. Mike
    Mike avatar
    32 posts
    Member since:
    May 2011

    Posted 26 Jan 2012 Link to this post

    I'm using the Upload control and am using the Vista style as the default style for all controls. When the page with the upload control is loaded, the browse button is initially styled with the default Telerik style, not the vista style. If the user moves his mouse button over the button, then the button appearance changes to the vista theme colors and stays that way. We want to have the button use the vista theme colors when the page loads. How do we do this?

    The included JPG illustrates the button as it is when the page is hit now (circled in red), and how we want the button to be (has a note next to it in red text). I've used the VisualTreeHelper to find the upload button, but can't set its state (using the VisualStateManager.GoToState method since it has none) or set its focus. The button.CaptureMouse method fails as well. No programmatic approach seems to work.

    We're using version 2011.3.1220.1040. 

    I'm wondering if the problem stems from the control template in the UpLoad.xaml file. One of the lines is the following:

    <telerik:VistaTheme x:Key="Theme" />
    

    In expression blend it complains that it can't find the VistaTheme in the  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" namespace. So I'm wondering if the theme isn't resolved until the user mouses over the button at run time. 

    Thanks,
    Mike
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 31 Jan 2012 Link to this post

    Hello Mike,

     I can assure you that the RadButton in the RadUpload gets its Theme correctly. You can see this Telerik Demo showing the different Themes in our RadButtons. Note that there is a small difference between the default Office Black Theme RadButton and the Vista Theme RadButton when the buttons are in unfocused state.
    However, if you need to change the "look and feel" of the RadButton in the RadUpload, you will have to edit the default template of the RadUpload. Please let us know if you need further assistance on this.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Mike
    Mike avatar
    32 posts
    Member since:
    May 2011

    Posted 31 Jan 2012 Link to this post

    Petar,

    That is exactly what we've done. This issue (where the  xmlns:telerik=http://schemas.telerik.com/2008/xaml/presentation isn't found) is one that I've seen in other threads. These threads don't take anything but image attachements, so I'm filing a support ticket so I can show you my modified template and related resource files.

    Mike
Back to Top