Displays

Display windows are created using the OpenDisplay() method. In order to see the display, you must also run an application event loop.

// Create a display with a 640x480 pixel client area named "My Display"
IPlatformSystem ps = PlatformSystem.Instance;
IPlatformDisplay display = ps.OpenDisplay("My Display", 640, 480);

ps.RunEventLoop();

Events

Displays expose several events (well, just one for now).

Resized

The resized event is raised when the size of the display client area has changed.

void OnResized(object sender, EventArgs e)
{
   IPlatformDisplay display = (IPlatformDisplay)sender;
   int newWidth = display.Width;
   int newHeight = display.Height;
}
 
display.Resized += OnResized;