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
1235
xamComboEditor DropDown Scrolling programmatically (item into view)
posted

Hello,

i want my xamComboEditor DropDown list scrolled programmatically. I aim for its starting with the selected item in the middle. I would be fine with a method to bring an item of this list into view like in XamDataTree.ScrollNodeIntoView (to bring the 10th record above it into view, without selecting it).

Greetings
KiTs 

Parents
  • 34510
    Verified Answer
    Offline posted

    Hi Joerg,

    Currently the XamComboEditor already brings the selected item into view when you open the drop down.  The editor tries to bring it to the top of the drop down.  If you need it to move to the center of the drop down, you can try the code provided here.  This stackoverflow post mainly refers to the ListView control but the code provided in the first answer is designed to work with an ItemsControl which the ComboBox is.  You can access the combobox through the XamComboEditor via the ComboBox property. (i.e. xamComboEditor1.ComboBox).

    If you use this code inside of the DropDownOpened event for the XamComboEditor, you will have to use it inside a Dispatcher.  If you don't, any scrolling you try to do will just get overridden by the XamComboEditor.

Reply Children
No Data