Tag Archives: C# programming

Find controls by name in WPF with C#

This example lets you find controls by entering their names. When you enter a control’s name and a color and click Apply, the program changes the selected control’s background color. You can use XAML code to give names to the … Continue reading

Posted in controls, wpf | Tagged , , , , , , , , , | Leave a comment

Let the user scribble on a background image in C#

The post Let the user scribble on a PictureBox in C# shows how you can let the user draw with the mouse. This example lets you load a background image. It also lets you save the result into an image … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , , , | Leave a comment

Insert a table into a RichTextBox in C#

Someone recently asked me if I could write a program to insert a table in a RichTextBox control and give it all of the features of a table in Microsoft Word. The short answer is “no.” The RichTextBox control just … Continue reading

Posted in strings | Tagged , , , , , , , | Leave a comment

Draw a radar chart in C#

A radar chart shows measurements along several axes that all radiate out from a common center. This lets you compare several properties for different objects at the same time. in a way, you can think of a radar chart as … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , | Leave a comment

Revised: Graph world total COVID-19 cases, deaths, and recoveries in C#

This post revises the example Graph world total COVID-19 cases, deaths, and recoveries in C#. Ulrich Rosin left a comment on that post. He added a seven-day average. He also displayed tick marks for the beginning of each month instead … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , , , , , | 1 Comment

Create button images in WPF and C#

It seems like I’m constantly building programs like this one to create simple button images that I can use in other programs. This example uses XAML code to create some simple button images. The program’s code then saves those images … Continue reading

Posted in graphics, image processing, wpf | Tagged , , , , , , , , | Leave a comment

Overlay parts of images in C#

My previous post Brighten pixels in an image in C# lets you brighten certain pixels in an image. Unfortunately is often brightens pixels outside of the area that you want to modify. For example, in the left side of the … Continue reading

Posted in algorithms, graphics, image processing | Tagged , , , , , , , , | Leave a comment

Brighten pixels in an image in C#

Sometimes when I take a picture, the poor lighting makes some pixels come out less brightly than I would like. For example, in the picture on the right the red raspberries aren’t very red. This example lets you brighten pixels. … Continue reading

Posted in algorithms, graphics, image processing | Tagged , , , , , , , , | 1 Comment

Perform binary contrast enhancement more quickly in C#

The example Perform binary contrast enhancement interactively in C# lets you convert an image into completely black and white pixels depending on their brightness. Pixels that are brighter than a given cutoff value are converted into white. Those that are … Continue reading

Posted in algorithms, image processing | Tagged , , , , , , , | Leave a comment

Save a RichTextBox image in C#

My post Get the image of a control or form, or a form’s client area in C# uses a control’s DrawToBitmap method to make it draw itself onto a bitmap. Unfortunately the RichTextBox control does not support that method. Another … Continue reading

Posted in controls | Tagged , , , , , , , | Leave a comment