windows-10-universal

Check if application is running from a background task

梦想与她 提交于 2019-12-23 02:32:40
问题 I'm creating an UWP application with a background task. I don't want to run the background when the real application is running or suspended. Is there some way to achieve that? I’ve looked on SystemConditionType but nothing fits what I'm looking for. 回答1: Since background tasks (except special ones) run in a separate process, there is not an elegant way to check if app is running or not since memory is not shared between the app and the background task. There are two ways that I implemented

System.Diagnostics.Process not working in Windows 10

a 夏天 提交于 2019-12-23 02:03:44
问题 I'm working in a UWP app in which I need to launch Microsoft Edge or Internet Explorer when the users clicks on a button. I've found that the way to do it is calling the System.Diagnostics.Process.Start() but I get: The type or namespace name 'Process' does not exist in the namespace 'System.Diagnostics' I've tried to install it with NuGet but I've gotten several Exceptions also... I've also tried using Launcher, but it hasn't done anything: await Launcher.LaunchUriAsync(new Uri("LINK"));

UWP MediaElement source from http with authentication

一世执手 提交于 2019-12-23 01:13:12
问题 Is there a way to use a MediaElement Control, to stream e.g. a video or audio file from a remote (web)server, which needs authentication for accessing? To access this server, i am using Windows.Web.HttpClient, but i dont know how to easily access the source with a MediaElement. Best regards 来源: https://stackoverflow.com/questions/37540437/uwp-mediaelement-source-from-http-with-authentication

Delphi FireMonkey - Setting Wallpaper on Win 10 does not work when deployed as APPX

回眸只為那壹抹淺笑 提交于 2019-12-22 18:43:13
问题 I have created a simple application using Delphi 10.2 Tokyo (using FireMonkey) that displays images and allows you to set the desktop wallpaper for a selected image. The main code that sets the desktop wallpaper is: class procedure TUtilityWin.SetWallpaper(AFileName: String); begin SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, pChar(AFileName), (SPIF_UPDATEINIFILE OR SPIF_SENDWININICHANGE)); end; While this works great when the application runs on the desktop (as a standalone install), it

Delphi FireMonkey - Setting Wallpaper on Win 10 does not work when deployed as APPX

时间秒杀一切 提交于 2019-12-22 18:43:12
问题 I have created a simple application using Delphi 10.2 Tokyo (using FireMonkey) that displays images and allows you to set the desktop wallpaper for a selected image. The main code that sets the desktop wallpaper is: class procedure TUtilityWin.SetWallpaper(AFileName: String); begin SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, pChar(AFileName), (SPIF_UPDATEINIFILE OR SPIF_SENDWININICHANGE)); end; While this works great when the application runs on the desktop (as a standalone install), it

CordovaApp.Windows.jsproj(70,3): error MSB4019: The imported project

时间秒杀一切 提交于 2019-12-22 14:12:13
问题 Full error log: C:\Users\user\Development\Tutorials\cordova-tutorial\hello\platforms\windows\CordovaApp.Windows.jsproj(70,3): error MSB4019: The imported project "C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Microsoft.VisualStudio..Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1 While doing Create your first app

parameter targetplatformversion cannot be null - visual studio 2015

浪尽此生 提交于 2019-12-22 10:36:32
问题 I have windows 10 installed laptop with visual studio 2015 on it. I am trying to create a new project of universal Windows phone application. I always get the error Prameter targetplatformVersion cannot be null. Follwing are the screen shot of my machine I have tried installation and re-installing the windows 10 sdk as well but no luck. Loading an existing project where I can see targetPlatformVersion already is also not loading and throwing same error. Any idea how I can track down this

Xamarin Form - How to open documents in uwp desktop application

寵の児 提交于 2019-12-22 01:15:09
问题 I want to open the documents like pdf, office , image, txt, rtf inside the uwp desktop application. is there any control in toolbox which open this type of documents ? :( thanks in advance :) 来源: https://stackoverflow.com/questions/57177253/xamarin-form-how-to-open-documents-in-uwp-desktop-application

How to create draggable pin in windows 10 to give pick location functionality?

扶醉桌前 提交于 2019-12-21 22:42:11
问题 I am working on MapControl in Windows 10 and I want to allow the user to drag the pin and when the user drops the pin want to get latitude and longitude of that position and get the location address by using API.I added Map Icon using following code MapControl map = frameworkElement as MapControl; map.MapServiceToken= "my service token"; BasicGeoposition councilPosition = new BasicGeoposition() { Latitude = Convert.ToDouble(Info.GetType().GetRuntimeProperty("LATITUDE").GetValue(councilInfo,

Add System.Web Reference To A Windows 10 Universal App

南楼画角 提交于 2019-12-21 21:34:06
问题 I download a project on Gitgub Basically is a Console Application. But I want to translate this C# Console Application to a Universal Windows App. I want to use HttpUtility.UrlEncode in a windows 10 universal, but I can not find System.Web in .NET (Add Reference) How can I add this assembly to my project? Error: The "HttpUtility" Does not existin the current context. Im using Visual Studio 2015 I try with this question: How Add System.Web Reference To A Windows Form Application But doesnt