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?
If I understand you correctly, you can place both Ribbon and ContentControl inside a same container that is RibbonWindowContentHost. The code will be look like:
<igRibbon:XamRibbonWindow x:Class="WpfApplication2.Window1"
………………………
<igRibbon:RibbonWindowContentHost>
<igRibbon:RibbonWindowContentHost.Ribbon>
<igRibbon:XamRibbon></igRibbon:XamRibbon>
</igRibbon:RibbonWindowContentHost.Ribbon>
<ContentControl Height="50" Width="200" Background="LawnGreen">
<Button Width="30" Height="20"></Button>
</ContentControl>
</igRibbon:RibbonWindowContentHost>
</igRibbon:XamRibbonWindow>
--------------------------------------------------------------------------------
Sincerely,BatnasanDeveloper Support Engineer, MCADInfragisticswww.infragistics.com/support
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
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:
<ContentControl x:Name="MenuLocation">
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();
}
I was just following up on this issue. Did the information above help you?
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.Boddy>
<Grid>... This is the body of the page.
</grid>
</igRibbon:RibbonWindowContentHost.Boddy>
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.