Flickering when loading a WPF VisualPlugin from Delphi

Hello,

We encounter severe flickering when loading our WPF VisualPlugin descendant into a Delphi window. By making some small modifications in the source code of uHYCLRManagedPluginWrappers.pas this flickering is removed. The code change involves moving the Delphi host control (THYPluginPanel) to load at a position off screen and move the control into correct position when the plugin has been loaded. The modified procedure that removes flickering is as follows:

procedure THYManagedVisualPluginWrapper.ShowParented(aParent: TWinControl);
begin
if not assigned(fPanel) then begin
fPanel := THYPluginPanel.Create(aParent, self);
// move the panel outside visible area
fPanel.Align := alNone;
fPanel.Left := 3000;
fPanel.Top := 3000;
fPanel.OnResize := OnParentResized;
THYPluginPanel(fPanel).OnDestroy := OnPanelDestroy;
fPanel.BevelInner := bvNone;
fPanel.BevelOuter := bvNone;
end;
fPanel.Parent := aParent;
fPanel.Show;
(ManagedInstance as IHYCrossPlatformVisualPlugin).ShowParented(Integer(fPanel.Handle));

// set the panel to fill the entire area of parent control
fPanel.Align := alClient;
end;

We would like the code (or similar) to be incorporated into the Hydra source code to address the flickering problem.

thanks,

Henrik

Thanks, logged as bugs://52959 for review
Posted by Bugs for Mac