-
Recent Posts
-
Recent Comments
- RodStephens on Use a standard Windows dialog to let the user select folders in C#
- Yohann on Use a standard Windows dialog to let the user select folders in C#
- Fred on Draw and move polygons snapping them to a grid in C#
- RodStephens on Display the local time and GMT in C#
- RodStephens on Draw a 3D surface with WPF, XAML, and C#
Archives
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- February 2014
- January 2014
- December 2013
- October 2013
- August 2013
- June 2013
- December 2012
- September 2012
- July 2012
- June 2012
- November 2011
- May 2011
- April 2011
- February 2011
- December 2010
Categories
- .NET
- 3D
- 3D graphics
- ADO.NET
- algorithms
- animation
- API
- arrays
- attributes
- audio
- books
- C#
- C# programming
- calculations
- challenges
- classes
- clipboard
- coding
- combinatorics
- console
- controls
- cryptography
- curve fitting
- database
- debugging
- dialogs
- directories
- Drag and Drop
- drawing
- drawings
- enums
- Event
- events
- example program
- Excel
- extension methods
- extensions
- files
- finance
- fonts
- formatting
- forms
- fractals
- ftp
- games
- GDI+
- generic
- geometry
- globalization
- graphics
- html
- IDE
- image processing
- inheritance
- interfaces
- internationalization
- internet
- interoperability
- LINQ
- lists
- localization
- mathematics
- memory
- menus
- MessageBox
- methods
- miscellany
- multimedia
- network
- Office
- OOP
- operators
- parsing
- performance
- phone
- PowerPoint
- printers
- printing
- productivity
- programs
- puzzles
- recursion
- reflection
- registry
- regular expressions
- serialization
- settings
- SQL
- stories
- strings
- syntax
- system
- threading
- three-dimensional graphics
- tips
- tools
- transformations
- Uncategorized
- user interface
- variables
- VBA
- web
- Windows Forms programming
- WMI
- Word
- wpf
- XAML
- XML
Meta
Monthly Archives: December 2015
Make a truncated cube in WPF and C#
Sorry but this is a pretty long post with a lot of details. If you don’t want to read about how the example program does its tricks, you can just read the first section and look at the pretty pictures. … Continue reading
Posted in algorithms, graphics, mathematics, wpf
Tagged algorithms, archimedean solids, C#, C# programming, cube, example, example program, graphics, mathematics, platonic solids, truncated cube, Windows Forms programming, WPF
1 Comment
Initialize a Dictionary in C#
The post Initialize two-dimensional arrays in C# explains how to initialize a two-dimensional array. Even though a Dictionary is a more complicated data type, you can use a similar method to initialize one. Simply enclose each of the Dictionary‘s key/value … Continue reading
Posted in syntax
Tagged C#, C# programming, dictionary, example, example program, initialization, syntax, Windows Forms programming
Leave a comment
A quick note about the .NET Graphics book Kickstarter
Several people have told me, “I will definitely buy the book when it’s finished.” Unfortunately that’s not the way Kickstarter works. You need to sign up now to receive a copy of the book. If we reach the project goal, … Continue reading
Posted in algorithms, drawing, graphics, mathematics, wpf, XAML
Tagged .NET Graphics, 3D, 3D graphics, algorithms, books, C#, C# programming, example, example program, graphics, mathematics, printing, three-dimensional graphics, Windows Forms programming, WPF, XAML
Leave a comment
Draw round circles in scaled coordinate systems in C#
In other posts I explain how you can use transformations to draw objects in a coordinate system other than the one provided “natively” by a PictureBox, Bitmap, and other objects that support drawing. Basically a transformation (represented by a Matrix … Continue reading
Posted in drawing, graphics, mathematics
Tagged C#, C# programming, drawing, example, example program, graphics, inverse, invert, lines, mathematics, Matrix, pens, scale, transform, transformation, Windows Forms programming
Leave a comment
Initialize an array of arrays in C#
The example Initialize two-dimensional arrays in C# explains how to initialize a two-dimensional array. An array of arrays is somewhat similar to a two-dimensional array but with some syntax differences. The following code shows how this example declares and initializes … Continue reading
Perform binary contrast enhancement interactively in C#
The example Perform binary contrast enhancement on an image in C# performs binary contrast enhancement by setting each pixel to black or white depending on whether the sum of its red, green, and blue component values is greater than 3 … Continue reading
Perform binary contrast enhancement on an image in C#
In binary contrast enhancement, you change every pixel in an image to either black or white depending on whether it is brighter than some cutoff value. This example takes a simple approach and makes a pixel white if the sum … Continue reading
Initialize two-dimensional arrays in C#
The example Initialize arrays, lists, and class instances in C# explains how to initialize a one-dimensional array. You can use a similar syntax to initialize multi-dimensional arrays. Use a new statement to indicate the type of array you are initializing. … Continue reading
Draw text with a moving brush in C#
This example uses a technique similar to the one used by the example Make a moving background in C#. It uses a gradient brush to draw its text. When the program’s Timer fires, its Tick event handler refreshes the PictureBox … Continue reading
Make a moving background in C#
This example displays text with a moving background color gradient. The following ShadeRect method contains the program’s most interesting code. // Fill the rectangle with a gradient that // shades from red to white to red. private void ShadeRect(Graphics gr, … Continue reading
Posted in drawing, graphics
Tagged background, background color, C#, C# programming, color gradient, drawing, example, example program, graphics, moving background, Windows Forms programming
1 Comment