Hello
I have to add UserControls / CustomControls to the XamRibbon. Everything working fine so far
but...
Is there a possibillity to change the Size of these Controls in the same way as the other Ribbontools?
(especially: ButtonTool)
igRibbon:RibbonGroup.MaximumSize= "..."
I also have to add Images and so on. In the Feature Browser I found a interesting example in the category "Custom Tools". But I think I need some general further explanation in order to understand it.
Whats the IRibbon interface? How can I implement it? Is this a proper way to achieve the task described above?
any help would be highly welcome.
Achim,
I did not see the event firing twice in your attached sample, unless this is a different sample, but I am glad it worked for you. For more information about the cloning process and implementation in general, you may probably want to review the source code of XamRibbon.
Sam
Hello Sam,
I attached a small sample project ...By adding the Button to the qat the Event will fire twice.
Using the IRibbon Interface and doing something like
protected class SeparatedButtonToolProxy : RibbonToolProxy<CustomButton>{
internal static SeparatedButtonToolProxy Instance = new SeparatedButtonToolProxy(); private SeparatedButtonToolProxy() { }
protected override CustomButton Clone(CustomButton sourceTool) { return new CustomButton(); }}
solved the problem. ( Though I don't quite understand it ). Perhaps a bit information about the cloning process would be helpful.
Thanks for your time.
I have not been able to recreate the scenario where the event would fire twice. Can you submit your code so I can test it here?
Hello again
I tried to solve the problem in creating a custom Button class which inherits from
Infragistics.Windows.Ribbon.ButtonTool ...
It's working fine so far but the custom Button defines a Event Handler in its constructor.
The problem now:
By adding the new CustomButton to the qat and clicking this Button in the qat the event will be invoked twice. Any general information about the cloning process for the qat? Has anybody a suggestion to solve my problem?
kind regards