Exemplo n.º 1
0
        private void _window_SizeChanged(object sender, OverlaySizeEventArgs e)
        {
            if (_graphics == null)
            {
                return;
            }

            if (_graphics.IsInitialized)
            {
                // after the Graphics surface is initialized you can only use the Resize method in order to enqueue a size change
                _graphics.Resize(e.Width, e.Height);
            }
            else
            {
                // otherwise just set its members
                _graphics.Width  = e.Width;
                _graphics.Height = e.Height;
            }
        }