I'm using WPF in WinForms with ElementHost. When the form loads, there is a flash of black background where the ElementHost is about to load. This looks kind of bad. Any suggestions on how to get rid of this?
相关问题
- How do I bind a DataGridViewComboBoxColumn to a pr
- Partial Form Class C# - Only display code view for
- Can we add four protocols to ServicePointManager.S
- How to properly handle form closing when using bac
- Filter Datagridview rows using TextBox
相关文章
- Sort TreeView Automatically Upon Adding Nodes
- Where does this quality loss on Images come from?
- Missing partial modifier on declaration of type
- PropertyGrid - Possible to have a file/directory s
- Why do base Windows Forms form class with generic
- How to handle the TextChanged event only when the
- Difference between SuspendLayout and BeginUpdate
- Adding Combobox to DataGridView Headers
you need first show control with empty bounds first time to avoid black flickering
I know this has already been answered and the question is old but none of the presented answers worked for myself and after a long time of troubleshooting the issue. I finally found an easier answer.
If you build a class extending from Element Host and in the initial constructor. You can set a Load Event for the Host Container. The Host Container is the panel that the Element Hosts Child is being displayed on top of. From there, just set the Host Containers background color to being of the Element Hosts Parents background color.
Like this
Hide the element (Visibility = Hidden) until the WinForms control is fully loaded...