Click here to Skip to main content
12,819,019 members (25,794 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


32 bookmarked
Posted 24 Jan 2012

Seven Segment in WPF

, 24 Jan 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
WPF Seven Segment User Control

WPF Seven Segment


In some of graphical softwares we need to have something like a SevenSegment, I need it somedays ago. So I've created this UserControl.


I saw some seven segment user controls in different websites.
Seven-segment LED Control for .NET
but no one of them could resolve my need.

Using the code

If you like to use this usercontrol in your application , you have to follow the following instructions :

1. First, you have to add the usercontrol Dll into your Application References :


2. Next, Add the following property into the Window tag :

Add the property into the Window tag

3. At Last, You can use the UserControl with the following XAML code :

You can use the UserControl with this code

Public Properties of SevenSegment UserControl

/// <summary>
/// Color Of Seven Segment Number
/// </summary>
public SolidColorBrush NumberColor

/// <summary>
/// Color Of dot `.` char
/// </summary>
public SolidColorBrush ColonColor

/// <summary>
/// Is `.` Visible or not
/// </summary>
public Visibility DotVisibility

/// <summary>
/// Is `:` Visible or not
/// </summary>
public Visibility ColonVisibility

/// <summary>
/// Delay of number blinking animation
/// </summary>
public KeyTime KeyTime { get; set; }

/// <summary>
/// Delay of `.` char blinking animation
/// </summary>
public KeyTime ColonKeyTime { get; set; }

/// <summary>
/// Peresents colon characters `:` with animation
/// </summary>
public bool ColonAnimation

/// <summary>
/// Radius of Blur on SevenSegment 
/// </summary>
public int BlurRadius

/// <summary>
/// Peresents SevenSegment with animation
/// </summary>
public bool PlayAnimation

Public Method of SevenSegment UserControl

/// <summary>
/// Sets number of seven segment number
/// </summary>
public void SetNumber(int number) { ... }


First Post : 2012/01/26


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Mohammad Dayyan
Iran (Islamic Republic of) Iran (Islamic Republic of)
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionWell done! Pin
Steffen Ploetz30-Sep-15 2:16
professionalSteffen Ploetz30-Sep-15 2:16 
QuestionImproper "two dots" synchronization Pin
Philippe Mori3-Nov-14 18:10
memberPhilippe Mori3-Nov-14 18:10 
GeneralMy vote of 2 Pin
ridoy21-Sep-13 7:56
professionalridoy21-Sep-13 7:56 
QuestionGood but how to scale Pin
Jason Song1-Jun-12 5:27
memberJason Song1-Jun-12 5:27 
AnswerRe: Good but how to scale Pin
Mohammad Dayyan3-Jun-12 22:35
memberMohammad Dayyan3-Jun-12 22:35 
QuestionExcellent Pin
jcarter12121225-May-12 16:03
memberjcarter12121225-May-12 16:03 
GeneralMy vote of 2 Pin
DavidMyEmail25-Jan-12 5:55
memberDavidMyEmail25-Jan-12 5:55 
QuestionNeeds more depth Pin
CIDev25-Jan-12 3:26
memberCIDev25-Jan-12 3:26 
GeneralKeep up the creative work Pin
TonyVictorious25-Jan-12 2:39
memberTonyVictorious25-Jan-12 2:39 
GeneralRe: Keep up the creative work Pin
Mohammad Dayyan25-Jan-12 2:42
memberMohammad Dayyan25-Jan-12 2:42 
QuestionThis is not really an article Pin
Sacha Barber24-Jan-12 20:59
mvpSacha Barber24-Jan-12 20:59 
QuestionGood but of no use. Pin
aamironline24-Jan-12 20:13
memberaamironline24-Jan-12 20:13 
AnswerRe: Good but of no use. Pin
Andy Missico24-Jan-12 21:09
memberAndy Missico24-Jan-12 21:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170308.1 | Last Updated 25 Jan 2012
Article Copyright 2012 by Mohammad Dayyan
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid