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
'C# Winform' 카테고리의 다른 글
C# Winform | Hardware Info | CPU ID, HDD, Mac, Serial (0) | 2020.04.29 |
---|---|
C# Winform | DateTime Convert(Long To, TimeStamp to) (0) | 2020.04.28 |
C# Winform | properties settings 저장 (0) | 2020.03.05 |
C# Winform | cross thread - InvalidOperationException (0) | 2020.03.02 |
C# Winform | Watermark in a textbox | Placeholder (0) | 2020.02.27 |