Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1350
Change size of popup menu arrow
posted

Hello,

I need to change the litle arrow in Popup-Controls in a Ribbon. I tried to use a creation filter but with no luck.

I can change the size of the drop down button, but not the image used for the arrow, see the image

This is my code so far:

// Increase DropDown button
PopupToolDropDownButtonUIElement dropDownBtn =
                    parent.ChildElements[1] as PopupToolDropDownButtonUIElement;
if(dropDownBtn != null) {
    // Increase size of DropDown-Button
    dropDownBtn.Rect = new Rectangle(dropDownBtn.Rect.X - 10,
                                    dropDownBtn.Rect.Y,
                                    dropDownBtn.Rect.Width + 10,
                                    dropDownBtn.Rect.Height);

    // Increase Arrow element
    if(dropDownBtn.HasChildElements) {
        dropDownBtn.ChildElements[0].Rect = new Rectangle(dropDownBtn.ChildElements[0].Rect.X - 5,
                                                        dropDownBtn.ChildElements[0].Rect.Y - 5,
                                                        dropDownBtn.ChildElements[0].Rect.Width + 10,
                                                        dropDownBtn.ChildElements[0].Rect.Height + 10);
        // Set new image --> Doesn't work --> Exception !!
        //(dropDownBtn.ChildElements[0] as ArrowUIElement).Image = ......;
                    
    }

    // Decrease text label size
    parent.ChildElements[0].Rect = new Rectangle(parent.ChildElements[0].Rect.X,
                                                parent.ChildElements[0].Rect.Y,
                                                parent.ChildElements[0].Rect.Width - 10,
                                                parent.ChildElements[0].Rect.Height);
}

Is this possible? Any help?

Thanks!

Regards

Michael

Parents
No Data
Reply Children