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

How to set the initial Browse button state

2 Answers 57 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 2
Mike asked on 26 Jan 2012, 08:11 PM
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 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 31 Jan 2012, 02:51 PM
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 >>

0
Mike
Top achievements
Rank 2
answered on 31 Jan 2012, 04:40 PM
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
Tags
Upload
Asked by
Mike
Top achievements
Rank 2
Answers by
Petar Mladenov
Telerik team
Mike
Top achievements
Rank 2
Share this question
or