Exemplo n.º 1
0
        protected override void OnRealized(object sender, EventArgs e)
        {
            var windowInfo = CefWindowInfo.Create();

            switch (CefRuntime.Platform)
            {
            case CefRuntimePlatform.Windows:
                var parentHandle = HostXid;
                windowInfo.SetAsChild(parentHandle, new CefRectangle(0, 0, m_hostConfig.HostWidth, m_hostConfig.HostHeight));
                break;

            case CefRuntimePlatform.Linux:
                windowInfo.SetAsChild(HostXid, new CefRectangle(0, 0, m_hostConfig.HostWidth, m_hostConfig.HostHeight));
                break;

            case CefRuntimePlatform.MacOSX:
            default:
                throw new NotSupportedException();
            }

            m_core.Create(windowInfo);
        }