Пример #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();
            }
        }
Пример #2
0
 protected internal virtual void OnDraw(SpriteBatch spriteBatch, Rect rect)
 {
     BackgroundBrush?.Draw(spriteBatch, rect);
 }