WindowsFormsHost in RadRibbonDropDownButton

2 posts, 0 answers
  1. László
    László avatar
    2 posts
    Member since:
    Jun 2012

    Posted 28 Aug 2013 Link to this post


    Can anybody help on how to use WindowsFormsHost in RadRibbonDropDownButton DropDownContent.
    I copied the RadRibbonDropDownButton style, change the popup AllowsTransparency to false (as a known issue for WindowsFormsHost in popup) and set the new style for my RadRibbonDropDownButton, but it is still not show the winforms control.
    Something still "block" it, but I did not find.
    Please help! Thanks!


  2. Kiril Vandov
    Kiril Vandov avatar
    324 posts

    Posted 30 Aug 2013 Link to this post

    Hello Lacka,

    The RadRibbonDropDownButton's popup is internally wrapped in our custom popup-wrapper which changes the AllowsTransparency property to true. That is why when you change the default style your change is overridden afterwords.
    As a workaround you could listen for the loaded event of the button and set the button popup AllowsTransparency to false, like follow:
    private void button_Loaded(object sender, RoutedEventArgs e)
        var button = sender as RadRibbonDropDownButton;
        if (button != null)
            var popup = button.FindChildByType<Popup>();
            if (popup != null)
                popup.AllowsTransparency = false;
    Doing so you do not need to override the default style.

    I hope this information helps.

    Kind regards,
    Kiril Vandov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top