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
15
Add button to dropdown of XamComboEditor
posted

Hi,

I would like to add a button to the bottom of my XamComboEditor like this (mockup)

Where the button would remain even if I've filtered out some of the options. 

Is this possible? If so, any suggestions for how I might go about this? It is only for this one area, so I do not want to mess with the default look of the editor. I am not in need of help figuring out the code behind to make the behavior work - just help in physically adding the button to the drop-down. 

Thanks in advance.

  • 2680
    Verified Answer
    Offline posted

    Hello Charlotte,

    Thank you for posting to Infragistics Community!

    It seems the mentioned mockup image did not come through. Anyways, I would assume you are referring to adding a button in the combo’s dropdown. Additionally, since there are two XamComboEditors in the Ultimate UI for WPF suite – the one from the Infragistics.Windows.Editors namespace (documentation link here) and the one from the Infragistics.Controls.Editors, also referred to as XamComboEditor (input) (documentation link here), I would assume you are using the latter since you mentioned filtering out the items. Nevertheless, if my assumptions are incorrect, please, provide more details on the control you are using as well as the requirement itself.

    So, in order to add a control to the dropdown area of the XamComboEditor (input), snce there is not a built-in templating API or similar, you would need to copy and modify its default style. It can be found under

     C:\Program Files (x86)\Infragistics\*your-version*\WPF\DefaultStyles\XamComboEditor\generic.xaml

    For your convenience, I am attaching a sample that contains a ResourceDictionary with the relevant Styles copied and where a custom user control containing a button is added by sligtly modifying the control’s template – please refer to the Popup element with name “Popup” starting on line 529 in the XCE_Custom.xaml file.

    Since you mentioned modifying a single control, this can still be achieved by only referecning the ResourceDictionary within the target combo's Resources collection.

    In conclusion, please, check out the sample and let me know if you need any further assistance on the matter.

    Best regards,
    Bozhidara Pachilova
    Software Developer

    6862.XCE-input-custom-control.zip