public static LaunchSource GetLaunchSource(this LaunchActivatedEventArgs args) { if (args.IsPrimary()) { return(LaunchSource.Primary); } else if (args.IsSecondary()) { return(LaunchSource.Secondary); } else if (args.IsJumplist()) { return(LaunchSource.Jumplist); } else if (args.IsChaseable()) { return(LaunchSource.Chaseable); } else { return(LaunchSource.Primary); } }