_______ _ _ _ _ _ __ _ _ _ ___
|__ __| | | | | | | | (_)/ _(_) | | (_) |__
| | ___ __ _ ___| |_| | | ___ | |_ _| |_ _ ___ __ _| |_ _ ___ _ __ ___ __ __ ) |
| |/ _ / _` / __| __| . ` |/ _ | __| | _| |/ __/ _` | __| |/ _ | '_ / __| / // /
| | (_) | (_| __ |_| | | (_) | |_| | | | | (_| (_| | |_| | (_) | | | __ V // /_
|_|___/ __,_|___/__|_| _|___/ __|_|_| |_|_____,_|__|_|___/|_| |_|___/ _/|____|
ToastNotificationを使用すると、WPFアプリケーションでリッチな通知を作成および表示できます。ポジション、行動、テーマなど、組み込みのオプションのセットで高度に構成可能です。拡張可能であり、単純にカスタムおよびインタラクティブな通知を作成する可能性があります。
例コード
ToastNotifications and ToastNotifications.Messages
Install-Package ToastNotifications
Install-Package ToastNotifications.Messages
ToastNotifications V2はプラグイン指向です。
Nuggetの「ToastNotifications」はコアであり、通知を作成および表示するための主要なメカニズムのみを含みます。事前定義されたメッセージおよびその他の重要な機能は、個別のナゲットによって提供されます。
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ノートリリースノート、新機能の説明、バグ修正、壊れた変更。
V1 ToastNotifications V2からのアップグレードはまったく新しい実装であり、バージョン1と互換性がありません。移行手順に従って新しいバージョンにアップグレードします。
構成ToastNotifications V2には、その位置、寿命、メッセージなどの構成オプションがたくさんあります。このドキュメントはすべてを説明しています。
カスタム通知の作成このドキュメントでは、独自の通知を作成する方法について説明します。
強力な名前のアセンブリトーストノティフィクションV2アセンブリが署名されています。詳細については、このドキュメントをお読みください。
アンディ・リー(https://github.com/oneandy)
B.ミッカ(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)
1月M.(https://github.com/pantheas)
ヨハネス・ジデル(https://github.com/jidel)
kostiantyn(https://github.com/dualbios)
krzysztofzmorzyński(https://github.com/zmorzynskik)
Robin Krom Lakritzator(https://github.com/lakritzator)
uwy(https://github.com/uwy)
ウィリアムデビッドコスシー(https://github.com/wdcossey)
新しい問題を作成する前に、多くの機能とオプションがすでに存在するため、ドキュメントを確認してください。 (https://github.com/raflop/toastnotifications/tree/master-v2/docs)
まだ問題がある場合は、以下の新しい問題/質問に記入してください。可能であれば、問題を再現するためのサンプルコードを提供してください。