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
375
Default size for ButtonTool in RibbonGroup
posted

I have a layout where in one RibbonGroup I have 5 ButtonTool components.  By default, I would like to show this where the first two buttons are of size ImageAndTextLarge and the remaining three buttons are set as ImageAndTextNormal.

Is it possible to set the default size on a ButtonTool?  I have not been able to find any information regarding this.

  • 54937
    Suggested Answer
    Offline posted

    By default tools within a ribbongroup are made as large as they are allowed to be and then shrunk down when there is no enough room based on the default variants for the groups (and in the absence of any variants based on the default resizing). The min and max sizes of tools on a ribbon group are controlled by the attached properties defined by RibbonGroup - MaximumSize and MinimumSize. Since ButtonTools are commonly small within Office apps it was decided that the default MaximumSize for a ButtonTool would be ImageAndTextNormal. If you would like a specific buttontool to be large then you can set its MaximumSize to ImageAndTextLarge either via xaml (e.g. igRibbon:RibbonGroup.MaximumSize = "ImageAndTextLarge") or in code using the RibbonGroup.SetMaximumSize method.