Hi.
I'm using the ButtonTool in XamRibbon. I'd like to have some button with larger appearance than others. For this I've tried to increase the buttons height but found out the buttons image and content do not increase respectively. Is there a way in which I'd be able to increase my icons?
Thanks,
Izhar Lotem
Just as with Office, the images of the tools are either small (16x16 in our default templates) or large (32x32) in our default templates. A ButtonTool on a RibbonGroup will use the small image whenever its SizingMode is ImageOnly or ImageAndTextNormal and will use the large image size when its SizingMode is ImageAndTextLarge. By default the attached property RibbonGroup.MaximumSize is ImageAndTextNormal for a ButtonTool. If you want it to be large you can set this property to ImageAndTextLarge. If you don't want the resizing logic to reduce the size of the tool when there isn't enough room you would set the RibbonGroup.MinimumSize attached property to ImageAndTextLarge. If you want to use sizes other than our defaults then you would need to retemplate the elements. You can use the default styles we ship with the product (located in the DefaultStyles directory) as the starting point for your custom templates.
Hi, I am creating ButtonTool dynamically and I've set RibbonToolSizingMode to ImageAndTextLarg, but still is the image inside Button small. Pl, need solution. thanx
RibbonTabItem rti = new RibbonTabItem(); rti.Name = bri.ribTab; rti.Header = bri.ribTabName; rti.Height = 20; rti.FontSize = 10; rti.RibbonGroups.Clear(); RibbonGroup = new RibbonGroup(); rg.Id = bri.ribSection; rg.Caption = bri.ribSectionName; RibbonGroup.SetMaximumSize(rg, RibbonToolSizingMode.ImageAndTextLarge); ToolHorizontalWrapPanel thwp = new ToolHorizontalWrapPanel(); thwp.MinRows = 3; rg.Items.Add(thwp); ButtonTool btn; foreach (BasicRibbonItem bi in polozky) { btn = new ButtonTool(); btn.Name = "btn" + bi.Name; btn.LargeImage = new BitmapImage(new Uri(bi.Image, UriKind.Relative)); btn.Caption = "Example"; thwp.Children.Add(btn); } rti.RibbonGroups.Add(rg); ribbon.Tabs.Add(rti);
The DefaultStyles folder is located under the Infragistics folder within Program Files. E.g. C:\Program Files (x86)\Infragistics\NetAdvantage 2010.3\WPF\DefaultStyles
Ous. I have forgoten this Directory. My fault. Thank you.
Which folders are necessary? Whole Default style Directory? If I add this to my project, many errors occures (probably references)
I'done what was in readme, but there is still small referencial problem. I cant find out, which reference is missing. Could you also tell me, which tag i RibbonGeneric determines the icon size. Thank you, quick answer is much appreciated.
HI,
All you have to do is to add these references:-InfragisticsWPF[CLRversion].Ribbon.v[productVersion]
-InfragisticsWPF[CLRversion].Editors.v[productVersion]
-InfragisticsWPF[CLRversion].v[productVersion]
-PresentationFramework.Luna
And when you add 'RibbonGeneric.xaml' you will be able to build without errors.
Regards,
Anastas
Solved. I''ve removed all Infragistic references and add them again.
Yes, it was in Help and I have already all of these referenced, bud despite that error still remains. Isn't it problem of version?