I have this style set for RibbonTabItem
<Style x:Key="styleRibbonTabItemStaticData" TargetType="{x:Type Ribbon:RibbonTabItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <StackPanel Orientation="Horizontal"> <Image x:Name="image1" Height="32" Width="160" Visibility="Collapsed" Source="/XXXX;component/Images/XXXX.jpg"/> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> </Style>
Under that I have a Ribbon Menu setup, as below :
<Grid> <xctk:BusyIndicator IsBusy="{Binding IsBusy}" BusyContent="{Binding BusyMessage}"> <Grid Name="layoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Ribbon:RibbonWindowContentHost> <Ribbon:RibbonWindowContentHost.Ribbon> <Ribbon:XamRibbon Theme="[Current]" IsMinimized="{Binding IsRibbonMinimized, Mode=TwoWay}" QuickAccessToolbarLocation="BelowRibbon" > <igRibbon:XamRibbon.ApplicationMenu> <igRibbon:ApplicationMenu Caption="MYAPPLICATION" > <igRibbon:ApplicationMenu.Items> <igRibbon:MenuTool Caption="Theme" SmallImage="Images\Menu\theme_icon.png" ButtonType="DropDown" Height="300"> <igRibbon:RadioButtonTool Caption="Aero" Tag="Aero" Click="ChangeTheme" Height="50"/> <igRibbon:RadioButtonTool Caption="Metro" Tag="Metro" Click="ChangeTheme" Height="50"/> <igRibbon:SeparatorTool/> <igRibbon:RadioButtonTool Caption="Office 2010 Blue" IsChecked="True" Tag="Office2010Blue" Click="ChangeTheme" Height="50"/> <igRibbon:RadioButtonTool Caption="Office 2007 Black" Tag="Office2k7Black" Click="ChangeTheme" Height="50"/> <igRibbon:SeparatorTool/> <igRibbon:RadioButtonTool Caption="Onyx" Tag="Onyx" Click="ChangeTheme" Height="50"/> </igRibbon:MenuTool> <igRibbon:SeparatorTool Height="3" Visibility="Hidden"/> <igRibbon:ButtonTool Caption="About Us" Height="200" Visibility="Hidden" Click="ButtonTool_AboutUs_Click" /> <igRibbon:ButtonTool Caption="Help" Height="200" Visibility="Hidden" Click="ButtonTool_Help_Click" /> <igRibbon:SeparatorTool Height="3"/> <igRibbon:ButtonTool Caption="Exit" SmallImage="Images\Menu\log_out_icon.png" LargeImage="Images\Menu\log_out_icon32.png" Height="200" Click="ButtonTool_Exit_Click" /> </igRibbon:ApplicationMenu.Items> <igRibbon:ApplicationMenu.FooterToolbar> <igRibbon:ApplicationMenuFooterToolbar> <igRibbon:ButtonTool Caption="Exit" SmallImage="Images\Menu\log_out_icon.png" Width="70" Click="ButtonTool_Exit_Click"/> </igRibbon:ApplicationMenuFooterToolbar> </igRibbon:ApplicationMenu.FooterToolbar> </igRibbon:ApplicationMenu> </igRibbon:XamRibbon.ApplicationMenu> <Ribbon:XamRibbon.Tabs> <Ribbon:RibbonTabItem Header="MY_MENU_ITEM"> . . . . </Ribbon:RibbonTabItem> <Ribbon:RibbonTabItem Header="MY_MENU_ITEMx"> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" igRibbon:RibbonGroup.MaximumSize ="ImageAndTextLarge" > . . . . </Ribbon:RibbonGroup> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> </Ribbon:RibbonTabItem> <Ribbon:RibbonTabItem Header="MY_MENU_ITEM"> . . . . </Ribbon:RibbonTabItem> <Ribbon:RibbonTabItem Header="MY_MENU_ITEM"> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> </Ribbon:RibbonTabItem> <Ribbon:RibbonTabItem Header="MY_MENU_ITEM"> <Ribbon:RibbonGroup Caption="MY_MENU_ITEM" > . . . . </Ribbon:RibbonGroup> </Ribbon:RibbonTabItem> <Ribbon:RibbonTabItem Name="Search" Header="Search" Visibility="Hidden"> <Ribbon:RibbonTabItem.Content> <Ribbon:ToolHorizontalWrapPanel> <Ribbon:ButtonGroup> <Ribbon:ButtonTool Id="MY_MENU_ITEMx" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.NewCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.MY_MENU_ITEM}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.MY_MENU_ITEMx}"/> <Ribbon:SeparatorTool Width="15"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:MY_MENU_ITEM.MY_MENU_ITEM}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.CancelCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Name="MY_MENU_ITEM" Caption="MY_MENU_ITEMx" Command="{x:Static utils:ViewModel.RefreshCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Name="CloseTab" Caption="_Close" Command="{x:Static utils:ViewModel.CloseTabCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.ExportCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.SendReportCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.ReSendReportCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.ApproveTemplateCommand}"/> <Ribbon:ButtonTool Id="MY_MENU_ITEM" Caption="MY_MENU_ITEM" Command="{x:Static utils:ViewModel.DownloadTemplateCommand}"/> </Ribbon:ButtonGroup> <navuc:SearchParameterView x:Name="SearchParameterView" /> </Ribbon:ToolHorizontalWrapPanel> </Ribbon:RibbonTabItem.Content> </Ribbon:RibbonTabItem> </Ribbon:XamRibbon.Tabs> <igRibbon:XamRibbon.QuickAccessToolbar> <igRibbon:QuickAccessToolbar> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:SeparatorTool Width="10"></igRibbon:SeparatorTool> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:SeparatorTool Width="10"></igRibbon:SeparatorTool> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> <igRibbon:QatPlaceholderTool TargetId="MY_MENU_ITEM" TargetType="Tool"/> </igRibbon:QuickAccessToolbar> </igRibbon:XamRibbon.QuickAccessToolbar> </Ribbon:XamRibbon> </Ribbon:RibbonWindowContentHost.Ribbon> </Ribbon:RibbonWindowContentHost>
While compiliing I get the error message as "Specified element is already the logical child of another element. Disconnect it first" and it is shown as an Unhandled Error.
The whole set of code, which starts from <Ribbon:XamRibbon is underlined and hovering the mouse over it gives me the tooltip as "Specified element is already the logical child of another element. Disconnect it first"
Please help....
Hello BM,
Thank you for your post!
I have been looking into your issue. What I have noticed in the code snippet, that you have provided is that you have multiple ButtonTools with the same Id. Would you please provide each ButtonTool a unique Id.
If the issue still persist after changing the Ids of the ButtonTools would you please provide me with more information about there where the style you have provided in your initial post is being assigned to the RibbonTabItem?
Looking forward to hearing from you.
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.
Thanks for looking into this, but the issue is not resolved.
I have just masked all the Button group and Button Tool ID's as I dont want to publish all the menu items in my code. They have different ID's and this specific piece of code was working fine with Infragistics 2013.2 version. I was trying to upgrade to 2015.1 and the issue popped up. The code gets compiled successfully and the application does executes, but the Ribbon menu is not visible / shown.
I have logged this behavior with our developers in our tracking system, with an issue ID of 203093. I have also created a support ticket on your behalf with number CAS-158362-H7F6M5 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account\My Keys and Downloads.