I recently revisited an old project to add new functionality and went ahead to update the IG controls versions. When I rebuild the project I had to fix some references. However i'm having fits with one last thing. I'm getting a complation error in my XAML where I am creating a ribbon group in a ribbon tab item. The specific error is: Cannot add content to object of type 'Infragistics.Windows.Ribbon.RibbonTabItem'
The code looks like this:
<UserControl xmlns:igRibbon="http://infragistics.com/Ribbon" x:Class="CriticalPath.CoursewareManager.ApplicationRibbon" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> <Grid x:Name="LayoutRoot"> <igRibbon:XamRibbon Theme="Office2k7Black"> <igRibbon:XamRibbon.Tabs> <igRibbon:RibbonTabItem Header="Course"> <igRibbon:RibbonGroup Caption="RibbonGroup" /> </igRibbon:RibbonTabItem> </igRibbon:XamRibbon.Tabs> </igRibbon:XamRibbon> </Grid> </UserControl>
I've tried using the designer to create the ribbon and it still gives me the error. There are no IntelliSense errors giving me indications of what's wrong. What's confusing me is I created a brand new WPF project and was able to get this working with no problem. Any ideas as to what could be the issue here or where I should be looking?
Hello ,
I have been looking into your issue however I wasn’t able to reproduce the error you mentioned. I copied your xaml snippet into a new UserControl and here is the result I got:
Please let me know if you are getting a different behavior when adding this to a new project and if you can provide me with some more clarifications on the matter.
If you look at my original post, I mentioned I was able to do the same thing. So my thinking is that something else is causing the issue. I'm looking more to get suggestions about things to check for. I upgraded the project to the latest IG version using the tool you provide. I also tried cleaning/clearing all the built assemblies.
Any ideas for things that could be causingt his?
Got it resolved and wanted to share the resolution. Apparently the IG Version Utility was the culprit. When I upgraded the project using the version utility, I told it to upgrade from CLR3 >> CLR4. However the project still had references to the CLR3 IG assemblies. Once I manually removed those, I replaced them with the new ones, I was good to go. I'm guessing the designer was using different assemblies than what were referenced in the project.
Figured this out by using WinMerge to compare the working project with the broken project.