Monthly Archives: April 2019

Graph equations entered by the user in WPF and C#

This example uses key techniques described in several examples, mostly the following two: Use transformations to draw a graph in WPF and C# Graph equations entered by the user in C# The following two sections describe the key techniques taken … Continue reading

Posted in algorithms, drawing, graphics, mathematics, reflection, wpf | Tagged , , , , , , , , , , , , , | 1 Comment

Use XAML and code behind to draw and outline shapes with gradients in WPF and C#

My unofficial slogan for WPF is, “Twice and flexible and only five times as hard,” and that applies to working with gradients. Gradients are undoubted cool and very flexible, but they are verbose and a bit tricky to use. How … Continue reading

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

Let the user draw a smooth curve with WPF and C#

This example combines techniques used by the following examples. Draw a smooth curve in WPF and C# Let the user draw a smooth curve in C# The program uses the following code to keep track off what it is doing … Continue reading

Posted in drawing, graphics, wpf | Tagged , , , , , , , , | 2 Comments

Draw a smooth closed curve in WPF and C#

The post Draw a smooth curve in WPF and C# explains how you can create a series of Bézier curves to smoothly connect a group of points. This example shows how to modify that one to create a smooth closed … Continue reading

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

Draw a smooth curve in WPF and C#

In Windows Forms programming, you can draw a smooth curve by using the Graphics object’s DrawCurve method. For some reason, Microsoft did not provide the ability to draw a smooth curve in WPF. Fortunatrely, you can use a series of … Continue reading

Posted in drawing, graphics, wpf | Tagged , , , , , , , , , | 2 Comments

Let the user draw a smooth curve in C#

This example lets the user click points to draw a smooth curve. When the user clicks the left mouse button, the program adds a point to the curve. When the user clicks the right button, the program stops drawing the … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , | 13 Comments