The WinForms Notepad Project: Themes (Premium)


In this context, I’m referring only to the foreground (text) and background colors used by the TextBox control that’s at the heart of our application. To change these colors, we’ll add a new Theme menu item under View. Selecting it will open a new submenu with a few pre-made choices (Black on white (the default), Black on light gray, Amber on black, and so on) plus two items for changing the text and background colors. The user’s theme selection will be saved and used each time the application is loaded.

The first step, of course, is to build out the menu. I assume by now you know how to do that, so here’s what my Theme menu looks like:

Gain unlimited access to Premium articles.

With technology shaping our everyday lives, how could we not dig deeper?

Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.

Become a Premium Member Create a Free Account