Skip to content
Alert Bar WPF UserControl
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
asset
src
test
.gitattributes
.gitignore
LICENSE.txt
README.md

README.md

Alert Bar WPF UserControl

This is a WPF usercontrol for displaying user updates through an alert bar. There are four types of alerts: success, danger, warning or information. The color scheme and icons for each are based on the type.

Screenshot 1

Dependencies

  • WPF Application

Usage

Download the archive or install the nuget. If you downloaded the archive then in Visual Studio you must go to Solution Explorer » right-click on References » Add a Reference » browse to DLL in the archive bin folder.

GUI:
In the xaml you must reference the namespace to add the usercontrol:

<Window ...
    xmlns:mbar="clr-namespace:AlertBarWpf;assembly=AlertBarWpf">

Using this reference place the control on the form. I typically position this above any other controls:

 <mbar:AlertBarWpf x:Name="msgbar" />

An optional IconVisibility parameter to remove icons from all alert messages. There is also a Theme parameter to adjust the look of the bar:

 <mbar:AlertBarWpf x:Name="msgbar" IconVisibility="False" Theme="Outline" />

Code Behind:
To make use of the control we trigger it in the xaml.cs. Call the methods like so:

msgbar.Clear();
msgbar.SetDangerAlert("Select an Item.");

Features

  • Multiple themes
  • Recognizable color scheme/icons for danger, success, warning, or information
  • Does not occupy space when not in use
  • Auto-closes (if desired)

API

Methods:

  • Clear
  • SetDangerAlert
  • SetSuccessAlert
  • SetWarningAlert
  • SetInformationAlert

Each of the creation methods above takes a message parameter and an optional timeout parameter (based on seconds).

XAML Properties:

  • Theme
  • IconVisibility

Themes:

  • Outline
  • Standard

Support

Found a bug or have a feature request? Open an issue.

Author

Chad Kuehn (@ChadillacMan)
http://chadkuehn.com

Copyright & License

Copyright (c) 2014 Chad Kuehn

AlertBarWpf is available under the MIT license. See the LICENSE file for more information.

You can’t perform that action at this time.