Tag Archives: WPF

Select rectangular areas in an image in WPF and C#

This is another fine example of WPF’s unofficial slogan: Twice as flexible and only five times as hard. Practically everything about this example is harder than it is in Windows forms: drawing the rectangle, selecting the area, saving the results … Continue reading

Posted in graphics, wpf | Tagged , , , , , , , , , , , | Comments Off on Select rectangular areas in an image in WPF and C#

Automatically set camera distance in WPF and C#

This example extends the post Build a geodesic sphere with WPF and C# to let you automatically set the camera distance to make the scene fill the viewport. Making a 3D scene fill the viewport nicely can be tricky. The … Continue reading

Posted in 3D graphics, algorithms, graphics, mathematics, wpf | Tagged , , , , , , , , , , , , , , , , | 6 Comments

Use XAML data binding to display an animated rectangle’s location

This example uses storyboard animation to move a rectangle and uses XAML data binding to display the rectangle’s location as it moves. It’s actually fairly simple, at least a far as WPF goes, once you figure out how to do … Continue reading

Posted in animation, wpf, XAML | Tagged , , , , , , , , , | Comments Off on Use XAML data binding to display an animated rectangle’s location

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 , , , , , , , , , | Comments Off on Find controls by name in WPF with C#

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 , , , , , , , , | Comments Off on Create button images in WPF and C#

Use menu commands with shortcuts to save and restore user-drawn polygons in C# and WPF

The example Let the user edit polygons in WPF and C# shows how to let the user draw and edit polygons in WPF. This example shows how you can let the user save and restore those polygons. While I was … Continue reading

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

Pingback: Code Project post “Clipping Plane in WPF 3D”

The Code Project post Clipping Plane in WPF 3D by charles922 references a couple of my WPF 3D posts. His post explains several WPF 3D concepts including; Manger sponges (refers to my post Use a dictionary to draw a 3D … Continue reading

Posted in 3D, 3D graphics, algorithms, books, drawing, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , | 4 Comments

Let the user edit polygons in WPF and C#

The post Let the user draw a polygon in WPF and C# shows how you can let the user draw polygons in a WPF application. This post shows how you can let the user edit them. Individually the program’s pieces … Continue reading

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

Let the user draw a polygon in WPF and C#

In a Windows Forms application, you can let the user draw a polygon by tracking mouse movement and redrawing the picture whenever necessary to draw the partially completed polygon. A WPF program normally does not do its own drawing. Instead … Continue reading

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

Use code to make a slideshow in C# and WPF

This is example shows how to make a slideshow in WPF. Unlike all of the examples I’ve seen on the internet, however, this one uses C# code rather than XAML. It’s actually fairly simple, it just took a long time … Continue reading

Posted in animation, wpf | Tagged , , , , , , | 7 Comments