You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To change the fluent theme of the application, I use the approach of: #12042 (comment)
However, after changing the theme, some controls become unusable. For instance, if a combobox (that was clicked at least once before I change the theme) is clicked, I receive the following error in Visual.cs, line 633:
$"The control {item.DebugDisplay} already has a visual parent {parent.GetDebugDisplay(false)} "+
$"while trying to add it as a child of {GetDebugDisplay(false)}.");
}
System.InvalidOperationException: 'The control ItemsPresenter (Name = PART_ItemsPresenter) already has a visual parent ScrollContentPresenter (Name = PART_ContentPresenter) while trying to add it as a child of ScrollContentPresenter (Name = PART_ContentPresenter, Host = ScrollViewer).'
I receive similar errors in other ItemsPresenter's as well.
Click on the combobox again, the error will crash the application.
Expected behavior
Color palette changes as expected, however app should not crash.
Avalonia version
11.2.3
OS
Windows
Additional context
If I remove the ScrollViewer from default combobox theme, ComboBox Theme, application does not crash. However, I suspect this problem happens with other controls that include a ScrollViewer as well, and ScrollViewer is not unnecessary.
The text was updated successfully, but these errors were encountered:
Describe the bug
To change the fluent theme of the application, I use the approach of: #12042 (comment)
However, after changing the theme, some controls become unusable. For instance, if a combobox (that was clicked at least once before I change the theme) is clicked, I receive the following error in Visual.cs, line 633:
Avalonia/src/Avalonia.Base/Visual.cs
Lines 633 to 638 in 0dd628f
System.InvalidOperationException: 'The control ItemsPresenter (Name = PART_ItemsPresenter) already has a visual parent ScrollContentPresenter (Name = PART_ContentPresenter) while trying to add it as a child of ScrollContentPresenter (Name = PART_ContentPresenter, Host = ScrollViewer).'
I receive similar errors in other ItemsPresenter's as well.
To Reproduce
Expected behavior
Color palette changes as expected, however app should not crash.
Avalonia version
11.2.3
OS
Windows
Additional context
If I remove the ScrollViewer from default combobox theme, ComboBox Theme, application does not crash. However, I suspect this problem happens with other controls that include a ScrollViewer as well, and ScrollViewer is not unnecessary.
The text was updated successfully, but these errors were encountered: