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

Check menu item

1 Answer 43 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Yoni
Top achievements
Rank 1
Yoni asked on 09 Sep 2014, 10:28 AM
Hello,

I have a menu item with image
I wish to check on/off the menu (highlight the image) when the user click on it (same like with the toolbar check button - when the button is checked the image is highlighted)

I used the tooglestate property but this works only without image

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 11 Sep 2014, 02:58 PM
Hi Yoni,

Thank you for writing.

In this case you should use two different images and change them when the toggle state is changed:
void radMenuItem3_ToggleStateChanged(object sender, Telerik.WinControls.UI.StateChangedEventArgs args)
{
    if (args.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
    {
        radMenuItem3.Image = Image.FromFile(@"C:\Users\karamfilov\Downloads\close.png");
    }
    else
    {
        radMenuItem3.Image = Image.FromFile(@"C:\Users\karamfilov\Downloads\close1.png");
    }
}

I hope this helps. Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Menu
Asked by
Yoni
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or