Hi,
I have created a simple user control with a Label and a TextBox. when you type in the TextBox I pop up a ListBox populated with various items as defined in our business rules. This is working correctly when used in isolation on a form.
My problem is getting it to sit on the xamRibbon alongside other controls. When I place my user control (ListSearchTextBox) in a RibbonGroup it does not behave visually like the native ribbon controls. See xaml below. In this example I would like the 2 ToggleButtonTool's to appear below my user control, so that you get the normal Ribbon (3 controls stacked) interface. Unfortunately, the 2 ToggleButtonTools appear in the next column and so the ribbon looks incorrect.
Could you advise me if I have to change my user control to make it fit in with the xamRibbon native controls? Or could I handle the user control differently in the ribbon to make it fit?
Regards
Ben Lait
<Window x:Class="ControlLoader.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igRibbon="http://infragistics.com/Ribbon"
xmlns:igReporting="http://infragistics.com/Reporting"
xmlns:igDock="http://infragistics.com/DockManager"
xmlns:local="clr-namespace:MyTestControl2;assembly=WpfControlLibrary1"
Title="MainWindow" Height="345" Width="817"
Background="Bisque">
<Grid >
<igRibbon:XamRibbon
Name="xamRibbon1"
Theme="Office2k7Black"
SnapsToDevicePixels="False">
<igRibbon:RibbonTabItem Header="Main" Name="rtMain">
<igRibbon:RibbonGroup Caption="List search">
<local:ListSearchTextBox LabelText="Fund" />
<igRibbon:ToggleButtonTool Caption="List mode" />
<igRibbon:ToggleButtonTool Caption="Another mode" />
</igRibbon:RibbonGroup>
</igRibbon:RibbonTabItem>
</igRibbon:XamRibbon>
</Grid>
</Window>
Thanks Andrew. That worked perfectly.
<local:ListSearchTextBox LabelText="Fund" Name="lstbFundNames" igRibbon:RibbonGroup.MaximumSize="ImageAndTextNormal"/>
Set the RibbonGroup.MaximumSize attached property on your local:ListSearchTextBox to "ImageAndTextNormal".