본문 바로가기

C# Winform

C# Winform | Notification Popup

by C기억저장소 2020. 2. 28.

C# Winform | Notification Popup

 

윈도우 우측 하단에 팝업창을 생성하기.

 

 

Visual Studio의 Nuget에서 다음의 라이브러리를 추가한다

 

 

설치 완료 후 [솔루션 탐색기]에서 [다시 빌드] 한다.

 

새로빌드하면 Form 디자인의 작업도구에 PopupNotifer가 추가되어 있다.

 

 

PopupNotifer를 Drag해서 From위에 올려놓는다.

 

form 아래에 추가되면 1단계는 완료이다.

 

[Button]을 추가하고 Click이벤트에 다음코드를 작성하고 실행한다.

 

private void button1_Click(object sender, EventArgs e)
{
    popupNotifier1.HeaderColor = Color.Blue;
    popupNotifier1.TitleText = "Hello";
    popupNotifier1.TitleColor = Color.Green;
    popupNotifier1.ContentText = "Hello" + Environment.NewLine + "Test";
    popupNotifier1.ContentColor = Color.Black;
   popupNotifier1.Popup();
}
cs
 

 

 

GitHub에서 오픈소스를 제공한다.

https://github.com/Tulpep/Notification-Popup-Window

 

Tulpep/Notification-Popup-Window

A notification window that appears on the lower right part of the screen. - Tulpep/Notification-Popup-Window

github.com

 

Notification-Popup-Window-master.zip
0.07MB