Click here to Skip to main content
Licence CPOL
First Posted 24 Jan 2012
Views 4,101
Downloads 500
Bookmarked 19 times

Seven Segment in WPF

By | 24 Jan 2012 | Article
WPF Seven Segment User Control

WPF Seven Segment

Introduction

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

Background

I saw some seven segment user controls in different websites.
e.g:
Seven-segment LED Control for .NET
http://www.teroid.net/product.aspx?name=wpfsevensegmentdisplay
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 :

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) { ... }

History

First Post : 2012/01/26

License

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)

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionExcellent Pinmemberjcarter12121217hrs 54mins ago 
GeneralMy vote of 2 PinmemberDavidMyEmail4:55 25 Jan '12  
QuestionNeeds more depth PinmemberCIDev2:26 25 Jan '12  
GeneralKeep up the creative work PinmemberTonyVictorious1:39 25 Jan '12  
GeneralRe: Keep up the creative work PinmemberMohammad Dayyan1:42 25 Jan '12  
QuestionThis is not really an article PinmvpSacha Barber19:59 24 Jan '12  
QuestionGood but of no use. Pinmemberaamironline19:13 24 Jan '12  
AnswerRe: Good but of no use. PinmemberAndy Missico20:09 24 Jan '12  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web03 | 2.5.120517.1 | Last Updated 25 Jan 2012
Article Copyright 2012 by Mohammad Dayyan
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid