Hi all,
How can I set the location of the XamRibbonWindow to pop-up in the center of the parent view? I want to do this from the xaml.
I am looking forward hearing from you!
Regards,
You should add it in the definition of ribbonWindow, just like in standard WPF window:
<igRibbon:XamRibbonWindow x:Class="WpfApplication100.Ribbon"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igRibbon="http://infragistics.com/Ribbon"
Title="Ribbon" Height="300" Width="400"
WindowStartupLocation="CenterOwner">
</igRibbon:XamRibbonWindow>
Anastas
Hi,
Can you please be more specific where I should add the syntax you mentioned. Please find bellow a snap of the code I'm using for the pop-up window
<igRibbon:XamRibbonWindow.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <Themes:PrimitivesOffice2k7Black/> <Themes1:DataPresenterOffice2k7Black/> <igEditorThemes:EditorsOffice2k7Black/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </igRibbon:XamRibbonWindow.Resources> <igRibbon:RibbonWindowContentHost> <igRibbon:RibbonWindowContentHost.Ribbon > <igRibbon:XamRibbon Theme="Office2k7Black" Height="25" > <igRibbon:XamRibbon.QuickAccessToolbar > <igRibbon:QuickAccessToolbar Visibility="Collapsed" HorizontalAlignment="Left"/> </igRibbon:XamRibbon.QuickAccessToolbar> <igRibbon:XamRibbon.ApplicationMenu> <igRibbon:ApplicationMenu Visibility="Collapsed" HorizontalAlignment="Left"> </igRibbon:ApplicationMenu> </igRibbon:XamRibbon.ApplicationMenu> </igRibbon:XamRibbon> </igRibbon:RibbonWindowContentHost.Ribbon> <igDock:XamDockManager Theme="Office2k7Black" Height="Auto" Width="Auto">
Hello,
You can specify the xamRibbonWindow's owner to your parent view, and after that set the WindowStartupLocation to "CenterOwner"(in XAML).
Hope this helps.