How to uninstall windows service on UWP app uninstallation?

We have following things:
  1. UWP app
  2. Windows service
  3. Msix bundle app package (packages both UWP app and windows service)
When UWP app launches, desktop application is launched as full trust process along with uwp app which further installs the windows service. But I want to uninstall windows service also on UWP app uninstallation. Basically, I want to know if there is any way to get notified if UWP app is uninstalling.

P.S: I tried package catalog method but it didn't work.
Was this page helpful?