Author Topic: WDE | Show Toaster custom  (Read 3250 times)

Offline kinguzzo

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
WDE | Show Toaster custom
« on: July 15, 2021, 03:57:37 PM »
Hello to everyone,
I'm working on WDE (8.5) and trying to show a custom toaster after an event (the event itself is not important). The toaster should show just a message to user and disappear after a while without any interaction by user. I'm looking online for some examples about that, but finding WDE code online is a very difficult task and the documentation I have is very poor.
Hope someone can help me.

Marked as best answer by kinguzzo on July 21, 2021, 04:06:06 AM

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: WDE | Show Toaster custom
« Reply #1 on: July 15, 2021, 05:42:23 PM »
In case you just need to show toaster based on your custom trigger, you can use AlertEvent object and publish it via EventAggregator. Example below:

[code]
var info = new AlertInformation("Public")
                {
                    Id = message,
                    Severity = SeverityType.Information
                };
ContainerAccessPoint.Container.Resolve<IEventAggregator>().GetEvent<AlertEvent>().Publish(info);
[/code]

Offline kinguzzo

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Re: WDE | Show Toaster custom
« Reply #2 on: July 20, 2021, 12:14:44 PM »
This is just what I was looking for. Thank you!!!

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: WDE | Show Toaster custom
« Reply #3 on: July 20, 2021, 01:04:05 PM »
Can you later post a screenshot on how this endup being shown at WDE?

Offline kinguzzo

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Re: WDE | Show Toaster custom
« Reply #4 on: July 20, 2021, 03:09:06 PM »
Hi,

here we have how the "AlertInformation" appears.

[url=https://imgbb.com/][img]https://i.ibb.co/wccrKQ4/Immagine.png[/img][/url]

BR

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: WDE | Show Toaster custom
« Reply #5 on: July 21, 2021, 02:07:43 AM »
8)  Awesome! Thanks!