Programming a Chess Game in C# | Part 4 - Drawing the Board

Опубликовано: 23 Март 2026
на канале: OttoBotCode
15,391
219

Learn how to program a Chess game in C#!

Welcome to part 4 of my C# Chess tutorial.
In this part, we leave the ChessLogic project for a bit and focus on the user interface instead! We render the board, including all the chess pieces, and make sure that the UI scales properly.

Assets:
https://ottobotcode.com/chess/ChessAs...

Source code is available here:
  / 78701  

Chapters:
0:00 - Plan
0:19 - Title & Startup Location
0:54 - Incorrect Scaling
1:12 - Proper Scaling
1:47 - Flush Fit
2:32 - Change Background Color
2:56 - Piece Grid
4:46 - Board Initialization
6:45 - Loading Piece Images
10:53 - GetImage Method
13:17 - Draw Chess Pieces
15:28 - High Quality Bitmap Scaling