Current filter:
                                You should refresh the page.
                                  • Hello DevExpress-team,

                                    When Binding string arrays with both regular strings and a null value to a ComboBoxEdit control via 'ItemsSource', we experience longer frezzes and display issues (null item not being shown).
                                    The freezes interestingly do only occur when starting the executable indepenently of Visual Studio in "Release" mode.
                                    To get the freezes, use the Scrollbar (scroll thumb, not the arrow buttons) in the Popup and simply scroll up an down the items until the thumb freezes in place for several seconds.

                                    We were able to reproduce the issues using a simple test project:

                                    [XAML]
                                    <Window x:Class="ComboBoxEditPerformance_Issue_DevExpress.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ComboBoxEditPerformance_Issue_DevExpress" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <StackPanel VerticalAlignment="Center"> <dxe:ComboBoxEdit ItemsSource="{Binding Source={x:Static local:MainWindow.Alphabet}}" /> </StackPanel> </Window>
                                    [C#]
                                    public partial class MainWindow : Window { public static IEnumerable<string> Alphabet => new string[] { null, "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E" }; public MainWindow() { InitializeComponent(); } }

                                    The questions are basically:
                                    * Is there any way to avoid the performance issues?
                                    * Is there any way to get the 'null' string displayed (as an empty item)?

                                • Andrey Marten (DevExpress Support) 07.25.2019

                                  Hello,

                                  Could you please elaborate on your final goal? Do you want to allow an end user to set this ComboBoxEdit's EditValue to Null by selecting such an item? If so, what if you use ComboBoxEdit's functionality for this purpose? Do not add the null value to your ItemsSource and enable your editor's AllowNullINput and ShowCustomItems properties. In this case, ComboBoxEdit will display the (None)  item (see the project in the attachment). What do you think about this approach?

                                  Thanks,
                                  Andrey

                                • Stefan Fiedler 07.25.2019

                                  Thanks for the fast answer and advice.

                                  I should've let you know that we could easily overcome the issue with a custom property, filtering out the null value and handling it with AllowNullInput - sorry.
                                  The sample provided above is a simplified version of our actual project and the 'Alphabet' array is actually an IENumerable populated directly with values from a database.

                                  Another reason for asking is because I am not sure whether this is a defined and expected behavior of the actual control, especially since it triggeres a high CPU utilization and hanging UI for multiple seconds in the RELEASE executable.

                                  I have phrased the original question like this because the expected behavior for me would've been that null items are simply shown as regular, but empty entries.

                                • Alexey Z (DevExpress Support) 07.26.2019

                                  Hello,

                                  Thank you for the clarification about the AllowNullInput property. As for the performance issues, to give you a more precise answer, we need to reproduce this behavior on our side, research it and find out which circumstances cause this behavior. So, would you please modify Andrey's sample or provide us with your application to demonstrate the issue? This information will allow us to find a suitable solution.

                                • Stefan Fiedler 07.30.2019

                                  Sorry for the late reply.
                                  I have packaged the code sample above in a Visual Studio solution, which should allow to reproduce the behavior.

                                  To reproduce the issue we experience:
                                   1. Open the solution in VS 2019
                                   2. Build the project
                                   3. Go to the 'bin\Debug' or 'bin\Release' folder (depending on the build configuration) and run the executable directly (ComboBoxEditPerformance_Issue_DevExpress.exe)
                                   4. Open the ComboBoxEdit Popup using the mouse on the downwards-facing arrow
                                   5. Within the popup - use the scroll thumb (not the mouse wheel) and scroll up- and down.
                                  --> The freezes occur when scrolling all the way up and trying to scroll down again

                                1 Solution

                                Creation Date Importance Sort by

                                Thank you for your additional clarification. This issue does not relate to our controls. For example, you can reproduce the same behavior if you set the VirtualizingPanel.ScrollUnit property to Pixel in the standard ListBox (see the attached project). Please also review this discussion: Scrolling in virtualized WPF TreeView is very unstable.

                                My brief research showed that if you define MinHeight in the ItemContainerStyle, this issue does not occur anymore:

                                [XAML]
                                <dxe:ComboBoxEdit.ItemContainerStyle> <Style TargetType="dxe:ComboBoxEditItem"> <Setter Property="MinHeight" Value="20"/> </Style> </dxe:ComboBoxEdit.ItemContainerStyle>

                                Check to see if the same operates correctly in your application.
                                Thanks,
                                Andrey

                                • Stefan Fiedler 07.30.2019

                                  Thank you for the clarification!
                                  I was indeed able to reproduce the problem with a regular ListBox by simply setting 'VirtualizingPanel.ScrollUnit="Pixel"' and using the same ItemsSource.

                                  As simply removing the 'null' item from the underlying ItemsSource got rid of the issue we thought this to be an issue in the DevExpress controls.
                                  Therefore thanks again for letting us know about the actual origin of the issue.

                                  This discussion can be closed as we have fixed the original problem by using 'AllowNullInput' and removing the 'null' items from the ItemsSource.

                                • Andrey Marten (DevExpress Support) 07.30.2019

                                  You are always welcome, Stefan. Feel free to contact us if you have additional questions.
                                  Andrey