title: How to let a toast notification stay in Windows 10 Action Center with Delphi
body: <p>I use Delphi 10.2 in Windows 10. The following code is the sample code provided by Embarcadero.</p>
  
  <p>After running this code the notification disappears and deosn't stay in Action Center. How can I let it pended there?</p>
  
  <pre><code>procedure TNotify.btnShowClick(Sender: TObject);
  var
    MyNotification: TNotification;
  begin
    MyNotification := NotificationCenter1.CreateNotification;
    try
      MyNotification.Name := 'Windows10Notification';
      MyNotification.Title := 'Windows 10 Notification #1';
      MyNotification.AlertBody := 'RAD Studio 10 Seattle';
  
      NotificationCenter1.PresentNotification(MyNotification);
    finally
      MyNotification.Free;
    end;
  end;
  </code></pre>
  
  <p>ADDED: After turning on the toggle of Windows Setting > System > Notifications &amp; actions I can see HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Embarcadero.DesktopToasts.0579D43A\ShowInActionCenter is 1. But each user who would use this application can't do this all the time manually and I cannot predict the name of the key either.</p>