CreateSurfaceEventArgsSurface Property Awesomium.NET 1.7.6Awesomium.NET
Gets or sets the ISurface instance that will be responsible for rendering the view's pixel buffer.

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version:

public ISurface Surface { get; set; }

Return Value

Type: ISurface
The ISurface instance assigned to the view in a previous call to CreateSurface, or the default ISurface instance if this is the first time CreateSurface is being called.

When CreateSurface is called, Surface reflects the previously assigned ISurface instance. If your surface is capable of handling resizing, you can keep on using the same ISurface instance on multiple CreateSurface calls.

When CreateSurface is called for the first time, Surface returns the ISurface assigned to the view using Surface or, if no ISurface instance has been previously specified, the default ISurface assigned to the view by Awesomium.NET. This is either a BitmapSurface (for WebView instances) or a technology specific ISurface.

Note Note
If you are using an ISurface instance capable of handling changes in size, you should better use Surface to assign your surface. This surface will be used with multiple calls of CreateSurface and it should be able to handle changes in size during Initialize(IWebView, Int32, Int32). In this scenario, you can ignore the CreateSurface event.
See Also