Closed jbalfonso closed 4 years ago
hi, i solved this fault using this:
Notifier notifier = new Notifier(cfg =>
{
try
{
cfg.PositionProvider = new PrimaryScreenPositionProvider(
corner: Corner.TopRight,
offsetX: 10,
offsetY: 180);
cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(
notificationLifetime: TimeSpan.FromDays(999),
maximumNotificationCount: MaximumNotificationCount.FromCount(12));
cfg.DisplayOptions.TopMost = true;
cfg.Dispatcher = Application.Current.Dispatcher;
}
catch (Exception ex)
{
MessageBox.Show(ex+"");
}
});
In place of use the parent window, use the primary window
Library version
ToastNotifications 5.2.1 ToastNotifications.Messages 5.2.1
Expected behaviour
When i show a showInformation, the wpf app crashes and it closes, but only ocurs with the wpf app is packaged, when its in debug, it runs ok, i packaged the app using windows instaler project
Actual behaviour
Steps to reproduce behaviour
notifier.ShowInformation("Recordatorio, temporada de primavera, realizar pedido de Filtros de polen");
Code to reproduce behaviour
Notifier notifier = new Notifier(cfg => { cfg.PositionProvider = new WindowPositionProvider( parentWindow: Application.Current.MainWindow, corner: Corner.TopRight, offsetX: 10, offsetY: 180);
notifier.ShowInformation("Recordatorio, temporada de primavera, realizar pedido de Filtros de polen");
Questions
How can i solve it? Because it happens?