Ejemplo n.º 1
0
        internal void Draw(SpriteBatch spriteBatch)
        {
            if (BackgroundBrush != null)
            {
                spriteBatch.Begin();
                BackgroundBrush.Draw(spriteBatch, ScreenRect);
                spriteBatch.End();
            }
            spriteBatch.GraphicsDevice.ScissorRectangle = _mainGrid.BoundingRect;

            spriteBatch.Begin(SpriteSortMode.Immediate, rasterizerState: new RasterizerState {
                ScissorTestEnable = true, MultiSampleAntiAlias = true
            });

            DrawControl(spriteBatch, _mainGrid);
            spriteBatch.End();

            if (FlyOut != null)
            {
                spriteBatch.Begin();
                DrawControl(spriteBatch, FlyOut);
                spriteBatch.End();
            }
        }
Ejemplo n.º 2
0
 protected internal virtual void OnDraw(SpriteBatch spriteBatch, Rect rect)
 {
     BackgroundBrush?.Draw(spriteBatch, rect);
 }