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
175
Large Image Issues
posted

Hi all

Got a slight issue with settng a ToggleButtonTool.LargeImage programmatically. The image is constantly showing small. I have noticed in the de-bugger that the tool.SizingMode has a value of "ImageAndTextNormal"  which may well have something to do with it - but I'm stuffed if I can find how to change it. Any help appreciated - routine code below - the bit in Bold is how I'm attempting to set the image of the ToggleButtonTool.

 

Cheers

Andy

 

Here's the code:

 

public void AddCustomerButton(Guid guid, string buttonLabel)

        {

            foreach (RibbonTabItem l_tab in this.TheRibbon.Tabs)

            {

                if (l_tab.Name == ICERibbonTabs.CustomersTab.ToString())

                {

                    foreach (RibbonGroup l_group in l_tab.RibbonGroups)

                    {

                      if (l_group.Name ==   ICERibbonGroup.OpenCustomersGroup.ToString())

                        {

                            ToggleButtonTool tool = new ToggleButtonTool();

                            tool.LargeImage = this._presenter.GetImage(Images32By32.customer);

 

                            tool.Name = "anythingfornow";

                            tool.Caption = buttonLabel;

 

                            l_group.Visibility = Visibility.Visible;

                            l_group.Items.Add(tool);

                        }

                    }

                }

            }

        }