
In a new XAML page, we need to create three rows of rectangles, which border radius will be set to 50 to give them a circular shape. The XAML rendering of the concept above is fairly simple.


For example, if we wish to display a time likeġ0:33:42, our leds must be illuminated according to the following pattern: From right to left, our leds will represents the values of 1, 2, 4, 8, 16, 32, because we will base our conversion on 24h formatted time, and we need a number of digits that can represent up to the decimalĮach part of the current time (hour, minutes, seconds) will have its own row of six leds, to represent the binary conversion of the decimal value. Of 1) or off (which represent the value of zero). Each led could be set in two statuses: on (which represent the value In the following example, we will create a set of graphical leds, each of which will represent a binary digit.

The project itself will serve to show some peculiarities, like the use of Tasks, how to manipulate the UI of a WPF page, and basic data conversions.Ī binary clock is a clock which displays the current time in a binary format. In this article we will create a simple binary clock using C# and WPF.
