This is a migrated thread and some comments may be shown as answers.
WindowsFormsHost in RadRibbonDropDownButton
1 Answer 15 Views
This is a migrated thread and some comments may be shown as answers.
László
Top achievements
Rank 1
László asked on 28 Aug 2013, 08:16 AM

   Hi,

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!

   Lacka


1 Answer, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 30 Aug 2013, 11:11 AM
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
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
Asked by
László
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Share this question
or