_______ _ _ _ _ _ __ _ _ _ ___
|__ __| | | | | | | | (_)/ _(_) | | (_) |__
| | ___ __ _ ___| |_| | | ___ | |_ _| |_ _ ___ __ _| |_ _ ___ _ __ ___ __ __ ) |
| |/ _ / _` / __| __| . ` |/ _ | __| | _| |/ __/ _` | __| |/ _ | '_ / __| / // /
| | (_) | (_| __ |_| | | (_) | |_| | | | | (_| (_| | |_| | (_) | | | __ V // /_
|_|___/ __,_|___/__|_| _|___/ __|_|_| |_|_____,_|__|_|___/|_| |_|___/ _/|____|
ToastNotifications를 사용하면 WPF 응용 프로그램에서 풍부한 알림을 작성하고 표시 할 수 있습니다. 위치, 동작, 테마 및 기타 여러와 같은 내장 옵션 세트로 구성 가능합니다. 확장 가능하며 간단하게 사용자 정의 및 대화식 알림을 만들 수 있습니다.
예제 코드
토스트 플라이시와 토스트 혁신
Install-Package ToastNotifications
Install-Package ToastNotifications.Messages
ToastNotifications v2는 플러그인 지향적입니다.
Nugget "ToastNotifications" 는 핵심으로 알림을 작성하고 표시하기위한 주요 메커니즘 만 포함합니다. 사전 정의 된 메시지 및 기타 주요 기능은 별도의 너겟에 의해 제공됩니다.
Messages 에는 오류, 정보, 경고, 성공과 같은 기본 메시지가 포함되어 있습니다. 자신만의 메시지를 만들려면 필요하지 않습니다.
< Application .Resources>
< ResourceDictionary >
< ResourceDictionary .MergedDictionaries>
< ResourceDictionary Source = " pack://application:,,,/ToastNotifications.Messages;component/Themes/Default.xaml " />
</ ResourceDictionary .MergedDictionaries>
</ ResourceDictionary >
</ Application .Resources> using ToastNotifications ;
using ToastNotifications . Lifetime ;
using ToastNotifications . Position ;
/* * */
Notifier notifier = new Notifier ( cfg =>
{
cfg . PositionProvider = new WindowPositionProvider (
parentWindow : Application . Current . MainWindow ,
corner : Corner . TopRight ,
offsetX : 10 ,
offsetY : 10 ) ;
cfg . LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor (
notificationLifetime : TimeSpan . FromSeconds ( 3 ) ,
maximumNotificationCount : MaximumNotificationCount . FromCount ( 5 ) ) ;
cfg . Dispatcher = Application . Current . Dispatcher ;
} ) ; using ToastNotifications . Messages ;
/* * */
notifier . ShowInformation ( message ) ;
notifier . ShowSuccess ( message ) ;
notifier . ShowWarning ( message ) ;
notifier . ShowError ( message ) ; /* * */
notifier . Dispose ( ) ; Relesae Notes 릴리스 노트, 새로운 기능에 대한 설명, 버그 수정 및 변경 중단.
V1 ToastNotifications V2에서 업그레이드하는 것은 완전히 새로운 구현이며 버전 1과 호환되지 않으며 마이그레이션 지침을 따라 새 버전으로 업그레이드하십시오.
구성 토스트 스톨 시로화 v2에는 위치, 수명, 메시지 및 기타 여러 가지에 대한 많은 구성 옵션이 있으며이 문서는 모두 설명합니다.
사용자 정의 알림 생성이 문서에서는 자신의 알림을 만드는 방법에 대해 설명합니다.
강력하게 이름이 지정된 어셈블리 토스트 나누기 v2 어셈블에 서명합니다. 자세한 내용은이 문서를 읽으십시오.
Andy Li (https://github.com/oneandy)
B. Micka (https://github.com/b-mi)
Cuiliang (https://github.com/cuiliang)
BrainCrumbz (https://github.com/braincrumbz)
fischjoghurt (https://github.com/fischjoghurt)
Francois Botha Igitur (https://github.com/igitur)
Jan M. (https://github.com/pantheas)
Johannes Jidel (https://github.com/jidel)
Kostiantyn (https://github.com/dualbios)
krzysztof Zmorzyński (https://github.com/zmorzynskik)
Robin Krom Lakritzator (https://github.com/lakritzator)
uwy (https://github.com/uwy)
William David Cossey (https://github.com/wdcossey)
새 문제를 만들기 전에 많은 기능과 옵션이 이미 있기 때문에 문서를 확인하십시오. (https://github.com/raflop/toastnotifications/tree/master-v2/docs)
여전히 문제가있는 경우 정보에 따른 새로운 문제/질문 채우기를 작성하십시오. 가능하면 문제를 재현 할 샘플 코드를 제공하십시오.