Есть ли проблема с шириной .Net 8 system.windows.controls.combobox?C#

Место общения программистов C#
Ответить
Гость
 Есть ли проблема с шириной .Net 8 system.windows.controls.combobox?

Сообщение Гость »


В нашем настольном приложении C# WPF мы используем system.windows.controls.combobox в нашем коде xaml. Мы используем один и тот же код MVVM для некоторых из этих окон уже несколько лет, и, похоже, после того, как мы перенесли наши проекты на .Net 8 из .Net Framework 4.8, у нас возникли некоторые проблемы с шириной ComboBox. В частности, это произойдет, если у нас есть HorizontalAlignment="Left"
Например, наш код будет следующим: We have hard-coded the width and this worked for multiple versions and looked like this:

Изображение
Without changing any code, the combo box now displays as with .Net 8:

Изображение
The dropdown arrow now overlaps with the text. Once I remove the HorizontalAlignment="Left" it seems to have the correct width but obviously not lined up as preferred:

Изображение
This seems to be a bug with Microsoft.WindowsDesktop.App.Ref\8.0.2\ref\net8.0\PresentationFramework.dll ??
I have .Net 8.0.3 installed.
Is this a known bug or are there some code changes I should now implement?
Thanks for all and any input!
I tried using DevExpress' dxe: ComboBoxEdit and their control works here, but we would like to be consistent across our application and not have to change all of our controls from Microsoft to third-party library controls.
When we updated to .Net 8, we expected to have our normal Microsoft Windows ComboBoxes working appropriately with the correct width.
We used our application and noticed several of our combo boxes in our WPF c# application were way too narrow which would not let the user see the data in the combo boxes with the overlapping dropdown arrow.


Источник: https://stackoverflow.com/questions/781 ... obox-width
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»