Using SetWindowPos from user32.dll makes ComboBox’s dropbox get rendered behind lower z-index objects
INTRODUCTION AND RELEVANT INFORMATION:
I am making a GUI widget application in WPF that will be rendered on top of a game. I am trying to add a ComboBox that will be rendered in front of widget’s background. Moving the ComboBox below the image in XAML simply fixes that but the popup from the ComboBox gets rendered behind the image no matter what I did. I tried setting the z-index of the ComboBox, z-index of ComboBox’s items, I tried moving the ComboBox to a different grid but none worked. After a bunch of tries I figured what causes this, it was the code I use to foremost/bottommost my widget: