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
325
Couple of question about xamRibbon
posted

Hi i want to work only with QAT from xamRibbon without the ribbon.

Is there any way to disable/hide/remove the button Show bellow the ribbon or even the all the Customize quick acess toolbar?

How to change the backgorund of buttons added to QAT? i tried to change by code the background and the style but none of them worked.

ButtonTool bt = new ButtonTool();
bt.Id="undoTool";
bt.Caption="Undo";
bt.Background = Brushes.Red;
bg1.Children.Add(bt);

Note bg1 is my buttongroup

 

Parents
No Data
Reply
  • 54937
    Offline posted

    NovabaseACD said:
    Hi i want to work only with QAT from xamRibbon without the ribbon.

    The QAT is pretty integrally tied to the xamRibbon as is required by the Office UI Guidelines. I'm not sure you're allowed to do this according to your license agreement with MS to honor the Office UI guidelines without violating that license agreement with MS.

    NovabaseACD said:
    Is there any way to disable/hide/remove the button Show bellow the ribbon or even the all the Customize quick acess toolbar?

    Currently there is no property to control the visibilty of this option. You should submit a suggestion for adding this.

    NovabaseACD said:
    How to change the backgorund of buttons added to QAT? i tried to change by code the background and the style but none of them worked.

    Acheiving the look of the office buttons is more complicated than can be accomplished with a single brush property so the default xaml for the button tools (the xaml is in included in the DefaultStyles directory) uses a custom element named RibbonButtonChrome that handles the rendering. Depending on the state of the associated tool (e.g. hot tracked, pressed, checked, disabled) as well as the size (e.g. ImageAndTextLarge, ImageAndTextNormal, etc.) it uses various brushes. These brushes come from resources for which we expose public resourcekeys so you could create brushes that have these keys and put them in the resources of the tool/qat/etc. That being said there is no brush for the "normal" state - i.e. a tool that is not checked, not pressed and the mouse is not over it - as these elements are transparent in Office. To deal with that you would probably need to retemplate the element and not use the RibbonButtonChrome but define your own xaml to style the element. You may also want to submit a suggestion for adding brushes for the "normal" button state.

Children
No Data