RadSplitButton with ContextMenu in DropDownContent

5 posts, 0 answers
  1. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 08 Aug 2011 Link to this post

    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
  2. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 08 Aug 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Viktor Tsvetkov
    Admin
    Viktor Tsvetkov avatar
    382 posts

    Posted 11 Aug 2011 Link to this post

    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 >>

  5. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 12 Aug 2011 Link to this post

    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


  6. Viktor Tsvetkov
    Admin
    Viktor Tsvetkov avatar
    382 posts

    Posted 12 Aug 2011 Link to this post

    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 >>

Back to Top
UI for WPF is Visual Studio 2017 Ready