Charm Notification Component






4.90/5 (26 votes)
Gorgeous notification component for creating advanced notifications
Introduction
The CharmNotification
is a component that allows you to create customized notifications that slide from the right to the left side of the bottom-right side of the screen.
Thanks to this component, you'll be able to customize the colors, icon, etc. of your notification or you can simply create new ones at Run-Time (as presented above).
Background
While coding or reading books, notifications like this (updates) appear in an attractive way with a cute tone, so I asked myself:
- Why don't I create a free component that does the same thing?
Implementation
This component contains several properties, here I present them all and their functionalities:
BackColor1
: The color of the left side of the notificationBackColor2
: The color of the right side of the notificationTitle
: The title of the notificationText
: The text of the notificationTitleForeColor
: The color of title of the notificationTextForeColor
: The color of title of the notificationIcon
: The icon the notificationDuration
: The duration of the notification (1000 = 1 second)PlayTone
: The notification will play a tone if this bool will be set true
Layout
Using the Code
CharmNotification
usage is made to be as easy as possible, however, you can manipulate it with codes or using the designer.
To fulfill the task and release your advanced notification, you can go through one of the two possible methodologies.
Easy Usage
- Drag and drop the component on the form.
- Edit the properties:
- Write this piece of code:
notification1.ShowNotification();
Run-Time Usage
To create a customized notification, you can write this piece of code:
Notification n = new Notification();
n.Title = "Windows update";
n.Text = "Windows started updating, please do not turn off you computer.";
n.Duration = 3000;
n.Icon = Properties.Resources.windows_32;
n.BackColor2 = Color.FromArgb(35,35,35);
n.BackColor1 = Color.FromArgb(28, 28, 28);
n.TitleForeColor = Color.WhiteSmoke;
n.TextForeColor = Color.WhiteSmoke;
n.ShowNotification();
Result:
That's all of it, folks!
Points of Interest
Sometimes, you must rely on the simplest stuff to create the most complicated things.
History
- 8/2/2016: First release