mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Ready event added. Also after when browser ready it is automatically resize it to control size. (Dirty commit, may not compiles).
This commit is contained in:
@@ -64,9 +64,17 @@ namespace CefSharp
|
||||
throw gcnew Exception("RunScript Exception:" + _jsError);
|
||||
}
|
||||
|
||||
void BrowserControl::OnReady(EventArgs^ e)
|
||||
{
|
||||
OnSizeChanged(this, EventArgs::Empty);
|
||||
|
||||
// todo: raise Ready event with control begininvoke
|
||||
Ready(this, e);
|
||||
}
|
||||
|
||||
void BrowserControl::OnHandleCreated(EventArgs^ e)
|
||||
{
|
||||
if(DesignMode == false)
|
||||
if (DesignMode == false)
|
||||
{
|
||||
_handlerAdapter = new HandlerAdapter(this);
|
||||
CefRefPtr<HandlerAdapter> ptr = _handlerAdapter.get();
|
||||
@@ -87,7 +95,7 @@ namespace CefSharp
|
||||
|
||||
void BrowserControl::OnSizeChanged(EventArgs^ e)
|
||||
{
|
||||
if(DesignMode == false)
|
||||
if (DesignMode == false && _handlerAdapter != nullptr && _handlerAdapter->GetIsReady())
|
||||
{
|
||||
HWND hWnd = static_cast<HWND>(Handle.ToPointer());
|
||||
RECT rect;
|
||||
|
||||
Reference in New Issue
Block a user