Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
139
RibbonWindowContentHost.Ribbon under UserControl
posted

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?

  • 995
    posted

    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,
    Batnasan
    Developer Support Engineer, MCAD
    Infragistics
    www.infragistics.com/support