Using Devexpress Ribbonform With Cefsharp Browser Resizes The Window To Smaller Size

98 views Asked by At

I recently created a simple ribbonform app using devexpress winforms controls. Just see the images to understand what is happening. Everytime cef.initialize is called the window resizes and becomes smaller. Without the chromium browser added this is the screen :

Main screen without any browser

The moment I add a browser component to it, this is what it becomes :

When I click Start button the window resizes and become smaller

Both images might look same but second screen is 40% of first one.

The code is very simple :

Try
Dim cef1 As New ChromiumWebBrowser
cef1.Dock = DockStyle.Fill
XtraTabPage2.Controls.Add(cef1)
cef1.LoadUrl("http://google.com")
Catch ex As Exception
MsgBox(ex.Message)
End Try

I even tried following settings but nothing happens :

Dim cefset As New CefSettings
cefset.DisableGpuAcceleration()
cefset.WindowlessRenderingEnabled = True
Cef.Initialize(cefset)
ChromiumWebBrowser1.LoadUrl("http://google.com")

I tried Googling but nothing comes up. Devexpress team says to ask Cefsharp dev team but I figured I will try first here. Any ideas on what might be happening?

Regards,

1

There are 1 answers

0
xhammer On

As recommended by Jimi in comment, I set my DPIaware to PerMonitor (V2) and it worked flawlessly.