Hi,
I need to re-template the DropDown of the XamMultiColumnComboEditor control to add a custom control just above the original list. Something like the Footer.
Thanks,
Ali
Hello, Ali,
By design, the XamMultiColumnComboEditor control doesn’t provide header template.
The best way to resolve this is to edit the XamMultiColumnComboEditor template and modify the footer area position. After that you can use the XamMultiColumnComboEditor FooterTemplate to set a custom control above the drop-down list.
To do this, first include the control's default styles in your project. You can find the XAML file at the following directory: C:\Program Files (x86)\Infragistics\2015.2\WPF\DefaultStyles\XamComboEditor\generic.xaml.
After that, find the FooterContentArea element in the XamMultiColumnComboEditor style and re-arrange the elements in the grid and set the FooterContentArea element before the drop-down element named ItemsPanel.
Have in mind that this customization may lead to some side effects in the drop-down sizing and resizing.
Sample project is attached.
Sincerely,
Hi Svelta,
Thanks for your reply; it was helpful. However, there are still some limitations in what I'm trying to achieve such as:
1- Cannot set the focus to the Footer custom control using the keyboard since the focus goes directly to the list as soon as the drop-down list opens.
2- Added a MenuItem, with sub-items, in the Footer template, but when I click the menu item the sub-items do not even come out!
<ig:XamMultiColumnComboEditor.FooterTemplate><DataTemplate><Border BorderThickness="1" BorderBrush="Black" CornerRadius="3" Background="Beige"><MenuItem Header="Category 1 (All products)"><MenuItem Header="Category 1"/><MenuItem Header="Category 2"/><MenuItem Header="Category 3"/><MenuItem Header="Category 4"/></MenuItem></Border></DataTemplate></ig:XamMultiColumnComboEditor.FooterTemplate>
I also attached a screenshot of what I'm trying to do.
Regarding your first question about focusing the footer custom control – by design, when opening the control drop-down, the first combo editor item is focused.
You still can workaround this behavior in the DropDownOpened event handler.
Regarding your second question about the menu items – the Menu control is missing in the provided code.
Modified sample is attached.