Hi,
I wanted to switch from Window to XamRibbonWindow as you instructed.
in step 4 you write:
Declare tags for the RibbonWindowContentHost's Ribbon property within the tags for the RibbonWindowContentHost. You can now add XAML for a xamRibbon control inside these tags. ...
My problem is that in my main window, I use a
<ContentControl x:Name="MenuLocation" .../>
while in a code I enter a UserControl that contains the XamRibbon as a content.
The problem is that I can't enter the <igRibbon:RibbonWindowContentHost.Ribbon> not in the main window hence it's child is <ContentControl and not in the userControl hence it's parent is UserControl and not RibbonWindowContentHost.
How can it be solved?
Basically in order to have the XamRibbon be incorporated into the non-client area of a xamRibbonWindow you must make the direct content of the xamRibbonWindow be a RibbonWindowContentHost and the Ribbon property must be set to the xamRibbon that will be incorporated into the non-client area. You cannot have the xamRibbonWindow's Content be your usercontrol and have it do this. As was recommended you would need to put the RibbonWindowContentHost as the Content, set the Ribbon property to the xamRibbon you want it to contain and then put your ContentControl as the Content of the RibbonWindowContentHost.
I did not check it yet. but I am wondering how would it know that this is the ribbon?
hence I have a ribbon (in the contentControl and an additional body.
<igRibbon:RibbonWindowContentHost>
<ContentControl x:Name="MenuLocation">
</ContentControl>
<igRibbon:RibbonWindowContentHost.Boddy>
<Grid>... This is the body of the page.
</grid>
</igRibbon:RibbonWindowContentHost.Boddy>
</igRibbon:RibbonWindowContentHost>
Or should I place the Ribbon's ContentCotrol in the Grid?
I tried before to put the contentControl in my Grid that is in the body and it was working but it did not get the nice affect it should have.
I was just following up on this issue. Did the information above help you?
Sincerely,BatnasanDeveloper Support Engineer, MCADInfragisticswww.infragistics.com/support
In this scenario you don’t have to specify igRibbon:RibbonWindowContentHost.Ribbon,hence you are placing the XamRibbon in the user control. The code will be look like:
and in code behind you can set the instance of the UserControl with the XamRibbon:
private void XamRibbonWindow_Loaded(object sender, RoutedEventArgs e)
{
this.MenuLocation.Content = new RbbonControl();
}
--------------------------------------------------------------------------------
Sorry but this is not the case.
In my case, the xamRibbonWindow caontain a ContentControl.
The real XamRibbon is entered as part of UserCotrol that inside that ContentControl:
e.g.
<igRibbon:XamRibbonWindow
<ContentControl x:Name="MenuLocation"
</igRibbon:XamRibbonWindow
---
behind code:
MyApp.View.MenuLocation.Content = RibbonCont
----
While RibbonCont is a UserCotrol:
<UserControl...
<igRibbon:XamRibbon