I'm trying to use a XamComboEditor along with AllowMultipleSelection="True" and CheckBoxVisibility="Visible", but the choices always open/appear above the control. How do i make it behave like every other combobox and open below the control? Also, why are the items i can select from checkboxes not lined up as in the WPF Sample Browser? Lastly, why does the arrows in the vertical scroll bar not work in the selected items? I can only scroll by dragging down. Here's my XAML:
<ig:XamComboEditor ItemsSource="{Binding SubClasses}" EmptyText="" SelectedItem="{Binding SelectedSubClass}" DisplayMemberPath="SubClassDescription" IsEditable="False" AllowMultipleSelection="True" CheckBoxVisibility="Visible" > <i:Interaction.Behaviors> <b:XamComboEditorSelectedItemsBehavior SelectedItems="{Binding SelectedSubClasses}"/> </i:Interaction.Behaviors> </ig:XamComboEditor>
Hello Travis,
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
Thanks Stefan. I see now my project had some implicit styles that were affecting the checkboxes etc. However, using my original project and your sample, it seems the XamComboEditor will always open upward if the control is located on the bottom half of the screen, and open downward if it is on the top half of the screen. How do i get it to always open downward, the normal behavior of regular comboboxes? I don't want all my comboboxes opening down, and then this one opening up sometimes, sometimes down etc. To be clear, drag your sample project window to the top of your screen and click it, it will open down. Then drag it to the bottom half of your screen, it will then open upward.
Stefan-
Here is a screenshot that shows my IG box clearly opening upward, while the MS combobox right next to it opens downward. They are bound to the exact same list etc. Does it matter that this is the "Shared XAML" XamComboEdiotr (I need the multi select capability)?
Here's the MS combo. Same binding source etc, same window position, the combo is in the same row right next to the IG one and it opens down.
I see the WPF only XamComboEditor does indeed open downward. Why does the Shared one open upward, and how can i fix this? I require the multiselect checkbox options.
I have been looking at the screenshots and I noticed that the items in the XamComboEditor are higher that the items in the MS ComboBox, which is the reason that they open in different direction. By default if there is enough space the dropdown is dropped down both in XamComboEditor and ComboBox. You can define an ItemsTemplate for the XamComboEditor’s Items and make it smaller. This way the dropdown will drop below the editor.
Hope this helps you.
Nope! i made the source of the XamComboEditor only one item, so there is plenty of room, and it still opens upward. Remember, I am specifically talking about the "SHARED XAML" xmlns:igxamComboEditor (xmlns:ig="http://schemas.infragistics.com/xaml"). The "WPF ONLY" XamComboEditor (xmlns:igEditors="http://infragistics.com/Editors") doesn't have this problem, it open upward just like the MS ComboBox.
I modified your example to show this goofed up behavior. Notice there is enough room. The Shared version open down. You have to make sure the combos are BELOW THE MIDPOINT OF THE HEIGHT OF YOUR SCREEN (relocated the window so they are), otherwise it will open upwards as expected. But while I'm at it, could you modify the example to show how to:"You can define an ItemsTemplate for the XamComboEditor’s Items and make it smaller. This way the dropdown will drop below the editor." -- because I don't like how spaced out the items are in the XamComboEditor when they have checkboxes.
I was able to reproduce your behavior and I can say that currently the drop down opens to the side where there is more space on the screen and if the space is equal it opens down. If you the logic to be changed, you can suggest new product idea for future versions (or vote for existing one) at http://ideas.infragistics.com.
There are many benefits to submitting an product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Screenshots follow