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
560
CustomButton in MenuTool
posted

Hello ...as shown in an example for the XamFeatureBrowser I created a CustomButton for the XamRibbon-Control.

The new CustomButton inherits Buttontool:

public partial class CustomRibbonButton : ButtonTool, IRibbonTool

and uses the following static constructor:

static CustomRibbonButton()
           {
RibbonGroup.MaximumSizeProperty.OverrideMetadata(typeof(CustomRibbonButton),new  FrameworkPropertyMetadata(RibbonToolSizingMode.ImageAndTextNormal));
           }

Inside the new Custom Control I want to react to the click event of the Custombutton itself. In order to achieve that I did something like that: 

protected override void OnClick()
   {
      base.OnClick();

           ...
   }

Everything is working as expected so far for a Button in the Ribbon or in the Qat. But when I add the CustomButton inside a Menutool Control I don't run in the OnClick Handler. Any help would be appreciated.

Parents Reply Children
No Data