Spirographs is a Windows application written in C# using WPF, and is based on Rod Stephen's Windows Forms based program listed on his C# Helper blog entry Draw a hypotrochoid (Spirograph curve) in C# at http://csharphelper.com/blog/2014/08/draw-a-hypotrochoid-spirograph-curve-in-c/
- Microsoft Windows Presentation Framework & XAML Version 4.0
- XCeed Extended.Wpf.Toolkit Version 3.4.0 (NuGet Package: https://www.nuget.org/packages/Extended.Wpf.Toolkit/)
This project demonstrates the following basic desktop application features:
-
Saving and loading the main application window size, position and user display preferences (Source Files: App.xaml.cs and UserSettings.cs.)
-
Managing and drawing on a WPF Canvas inside a Viewbox, allowing for a dynamically generated graphic to be proportionally scaled as the main application window is resized (Source Files: MainWindow.xaml and MainWindow.xaml.cs.)
-
Saving the contents rendered to a WPF Canvas using a BitmapEncoder to a specified BMP, GIF, JPEG, PNG, TIFF or WMP image file format (Source Files: Spirograph.cs.)
-
Creating modal dialog boxes derived from WPF's Window class (Source Files: AboutSpirographDialog.xaml and AboutSpirographDialog.xaml.cs, SettingsDialog.xaml and SettingsDialog.xaml.cs, and WarningDialog.xaml and WarningDialog.xaml.cs.)
-
Customizing the appearance of application windows and their child elements using WPF XAML declarations, attributes, resource definitions, styles and triggers (Source Files: MainWindow.xaml, AboutSpirographDialog.xaml, SettingsDialog.xaml, and WarningDialog.xaml.)
-
Using a WPF Hyperlink to open a specified web link using the system's default web browser (Source Files: AboutSpirographsDialog.xaml and AboutSpirographsDialog.xaml.cs.)
The following are samples of the types of spirographs that can be rendered using this application. For each of the samples listed below, the main application window should be set with a width of 575 pixels by 630 pixels.
Released under the GNU General Public License Version 3