hi,
is it possible to have a usercontrol in a XamRibbonTabItem or XamRibbonGroup? can you please point to some sample code on this?
thanks.
Hello Tuan and Aneesh,
Thank you for your replies.
Tuan,
I have been looking into the issue that you have described and the reason for the UserContorls to not show in the ChildWindow is that the default style of the custom ribbon tool is defined in the MainPage and the ChildWindow is a popup, which is have different scope and it cannot use the resources of the MaiPage, which results in the custom ribbon tool to have no template. In order to avoid this issue, you can move the default style for the custom tool to the Resources of App.xaml.
Aneesh,
The reason for the user controls to not be fully visible when they have larger height is that the XamRibbon is designed to have specific height and it does not increase its size if there is a content with height more than its. In order to allow the XamRibbon to take more height, you can re-template the XamRibbon and increase the height of the GroupArea Grid, which is part of the Template of the Ribbon. You can get the default style for the XamRibbon from your Infragistics folder. The default path is:
C:\Program Files (x86)\Infragistics\NetAdvantage 2013.1\Silverlight\DefaultStyles\XamRibbon\ generic.xaml
I am also attaching a screenshot of Silverlight Spy, which shows the element that I am referring to.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
I found issue in setting height of control. If my custom control's height is more then it gets hidden partially.. Is there a way to set height of XAM ribbon group in order to display cutom control in full if height of custom control is more?
Hi, thank you for you reply. I created ribbon menu with usercontrol. But I created that to child window, and when load the popup againin the second time, it didn't load usercontrol.
Hello,
I am just checking if you require any further assistance on the matter.
Krasimir
Developer Support Engineer
Thank you for your feedback. The XamRibbon control is not designed to be host for controls and UserControls, it is supposed to host RibbonTools in it and this is the reason that I have created the approach that I have provided you, with implementing the custom RibbonTool that allows you to add different UserControl as its visual representation. I have been testing the sample application that I have provided you with and, currently I have found no issues with the implementation. If you are using this approach with many UserControls in the XamRibbon, there should not be any issues.
Please let me know if you need any further assistance while implementing the XamRibbon with UserControls.