On Windows 10 >= 1803, you can add for example a Page_Loaded event with
private async void Page_Loaded(object sender, RoutedEventArgs e)
{
IList<AppDiagnosticInfo> adi = await AppDiagnosticInfo.RequestInfoForAppAsync();
IList<AppResourceGroupInfo> argi = adi[0].GetResourceGroups();
await argi[0].StartSuspendAsync();
}