Declined
Last Updated: 02 Sep 2016 08:52 by ADMIN
ADMIN
Telerik Admin
Created on: 25 Aug 2011 10:55
Category: UI for WPF
Type: Feature Request
5
UAC shield icon
Automatic or easy to configure support for displaying the UAC shield icon when the command that will be executed by the Button or the Menu item will require elevated permissions.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
7 comments
ADMIN
Stefan
Posted on: 02 Sep 2016 08:50
Hi Tiago,

Glad to hear you find this useful. 

I am not sure, however, if such a API for automatically setting the image is necessary. Following the same logic we may have to introduce such for Error, Exclamation, Question and plenty other icons which will make the API cumbersome.

Setting UAC image takes just 2 lines of code with the approach provided, which seems pretty acceptable and no need for third party implementation. This is why, we will be declining this request as well.

Tiago
Posted on: 01 Sep 2016 16:38
Hi Stefan,

Thanks for your code block.. it really simplify how to get the UAC shield image and set it to a button! :-)
I was wondering if is possible to create a bool property in the RadButton so when it is true, the button checks the Windows UAC level and set the icon by itself. Of course, when false the button has the same behavior as today. Thus, I don't need to have any code block to change the icon! :-D

Thanks! 


ADMIN
Stefan
Posted on: 01 Sep 2016 15:32
Looking further into this, I found a really easy way to set the UAC icon to your buttons, which makes wrapping such function unnecessary:

System.Drawing.Icon myIcon = new System.Drawing.Icon(System.Drawing.SystemIcons.Shield, 16, 16);
            radButton1.Image = myIcon.ToBitmap(); 
ADMIN
Stefan
Posted on: 01 Sep 2016 15:13
The button/menu item does not know what you will execute in its click handler, so it cannot detect automatically. Perhaps, what we can do is to wrap the function you currently use in some kind of method and expose it for you to use - the function will return again the image which should be assigned to the button Image property. I don't really see much benefit in this.

Let me know what are your thoughts, or if you had something different in mind.
Tiago
Posted on: 01 Sep 2016 14:17
Hi Stefan,

I know about setting images to buttons, but what I mean is that the button component should do it automatically according to UAC config level.

Check the workaround we have to do in WinForms: http://www.telerik.com/forums/button-and-uac-shield.

Thanks,
ADMIN
Stefan
Posted on: 01 Sep 2016 12:30
Hi Tiago,

for WinForms related requests please use the WinForms portal: http://feedback.telerik.com/Project/154

As to the UAC icon, you can set images to buttons and menu items in WinForms, so feel free to set it for the items you need. If this is not what you need, let us know in the portal or in a support thread, so we can discuss this matter further.
Tiago
Posted on: 01 Sep 2016 12:00
Please.. This suggestion must be implemented in the Windows Forms too, not only WPF and Silverlight!