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

RadSplitButton with ContextMenu in DropDownContent

4 Answers 204 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 08 Aug 2011, 10:02 PM
I've got a form with a RadSplitButton on it.  I've set the control's DropDownContent to a RadContextMenu.  When I click on the DropDown indicator, the context menu shows.  However, when you click on an item in the context menu, the context menu does not close.

How do I make the context menu close once an item in the menu has been clicked?  There doesn't seem to be a Close method in the RadContextMenu class, though there are Closing & Closed events.

Also, is there a way that I can change the width of the Drop Down Indicator?  There doesn't seem to be a property for it.  I'm working on a WPF application with touch screen support that will run in a police car, so everything has to be large for a cop to make effective use while driving.  The buttons are rather large & the drop down indicator is down-right puny & easily missed at its current size.

Tony

4 Answers, 1 is accepted

Sort by
0
Tony
Top achievements
Rank 1
answered on 08 Aug 2011, 10:25 PM
I managed to find the means to close the context menu in the split button.  I found another post where someone was having the same issue.  It seems I have to set the button's IsOpen property to false in the click handler for the menu item & the drop down context menu closes.  Not exactly what I expected but it works.

Any information about adjusting the width of the drop down indicator is appreciated.  Do I have to play with the content template to get the look I want?

Tony
0
Viktor Tsvetkov
Telerik team
answered on 11 Aug 2011, 04:15 PM
Hello Tony,

In order to style the drop down indicator you can use the TogglePartStyle property of the RadSplitButton. I have created a sample project in which I simply change the width of the toggle part, but you can change whatever you need including resizing the Path which is actually the drop down indicator. If you need further assistance feel free to ask.

All the best,
Viktor Tsvetkov
the Telerik team

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

0
Tony
Top achievements
Rank 1
answered on 12 Aug 2011, 01:40 PM
Viktor:

Thank you very much for the code!  This helps immensely.

There's only one problem:  I'm getting 2 errors that read:

Cannot find the static member 'InnerCornerRadiusProperty' on the type 'RadToggleButton'.

and

Property 'InnerCornerRadius' was not found in type 'RadToggleButton'.

I have the WPF Q2 2011 version of the Rad Controls installed.  Is this the latest version?  Do I need a different version to get this to compile cleanly?

Thanks

Tony


0
Viktor Tsvetkov
Telerik team
answered on 12 Aug 2011, 02:53 PM
Hi Tony,

This property is included in one of the internal builds after Q2 2011, so could you please try it with the binaries from the latest internal build?

Best wishes,
Viktor Tsvetkov
the Telerik team

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

Tags
Buttons
Asked by
Tony
Top achievements
Rank 1
Answers by
Tony
Top achievements
Rank 1
Viktor Tsvetkov
Telerik team
Share this question
or