uwp

Setting a wallpaper in background task

你说的曾经没有我的故事 提交于 2019-12-31 06:42:27
问题 I want to get all images from a storage folder in background task. Firstly registered a background task in app_entering background method. I am also able to debug Run method,but none of the await methods are working- public void Run(IBackgroundTaskInstance taskInstance) { var differal = taskInstance.GetDeferral(); UpdateUI(); differal.Complete(); } public async void UpdateUI() { StorageFolder folder = await KnownFolders.PicturesLibrary.GetFolderAsync("Wall_e_photos")//here execution stops and

Extended execution in UWP

半城伤御伤魂 提交于 2019-12-31 06:25:30
问题 I want to use a background task for my UWP app. The below code, is my back button click event in windows mobile- private async void MainPage_BackRequested(object sender, BackRequestedEventArgs e) { var access= await BackgroundExecutionManager.RequestAccessAsync(); var task = new BackgroundTaskBuilder { Name="My task",TaskEntryPoint=typeof(backGroundTask.Class1).ToString() }; trigger = new ApplicationTrigger(); task.SetTrigger(trigger); task.Register(); //var result = await trigger

Extended execution in UWP

此生再无相见时 提交于 2019-12-31 06:25:19
问题 I want to use a background task for my UWP app. The below code, is my back button click event in windows mobile- private async void MainPage_BackRequested(object sender, BackRequestedEventArgs e) { var access= await BackgroundExecutionManager.RequestAccessAsync(); var task = new BackgroundTaskBuilder { Name="My task",TaskEntryPoint=typeof(backGroundTask.Class1).ToString() }; trigger = new ApplicationTrigger(); task.SetTrigger(trigger); task.Register(); //var result = await trigger

Programatically press a button in a website from an app in a phone

大憨熊 提交于 2019-12-31 05:33:09
问题 I am creating a UWP app using c#. The app is supposed to fetch information from a website and present it to the user. I've went through the DOM of the site and managed to download the HTML of the site. But some of the information is hidden and only appears when certain buttons or selections are made on the website. Is there a way that I can programmatically go into the site, make a selection, the download the new html? 2nd Question: The app should have an fb liveChat function linked an fb

UWP: How to get the TaskBar Height

非 Y 不嫁゛ 提交于 2019-12-31 05:29:07
问题 I am making an UWP application.My requirement is to get the size of the TaskBar programatically (This application will run on Tablets of different resolution). After following many answers on stackoverflow(which were actually more relevant to hiding/showing the taskbar), I came through this: How do I get the taskbar's position and size? But this can't be done in case of UWP apps.Is there any other way to get the Height of the TaskBar. Please Note : The TaskBar is always visible in case of my

Invalid Credentials on MapLocationFinderResult uwp c#

亡梦爱人 提交于 2019-12-31 05:24:29
问题 I am having a strange problem with the use of MapLocationFinder. I am using MapLocationFinder to retrieve longitude and latitude based on string address: string address = ""; // Any address here var locFinderResult = await MapLocationFinder.FindLocationsAsync(address, new Geopoint(new BasicGeoposition())); After this, I use Laucher to start "drive to" application and get navigation map: var geoPos = locFinderResult.Locations[0].Point.Position; var url = $"ms-drive-to:?destination.latitude=

Marshalling “EGLRenderResolutionScaleProperty” to ANGLE from C# using P/Invoke

夙愿已清 提交于 2019-12-31 04:37:07
问题 I am trying to get ANGLE working in C# using P/Invoke. Basically, I am creating a simple 2D surface, and then passing that off to skia (using SkiaSharp). Everything is working and all that, but I am having a problem marshalling PropertySet to the unmanaged code. This bit works fine: // the properties var props = new PropertySet(); props.Add("EGLNativeWindowTypeProperty", swapChainPanel); // the surface attributes int[] surfaceAttrs = { EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER, EGL_TRUE, EGL

Universal Windows Plateform And Live SDK

别等时光非礼了梦想. 提交于 2019-12-31 04:33:25
问题 I have a problem. I recently installed VS 2015 and Windows 10 on my computer. Having Universal Apps are amazing and I plan to convert some of my programs on UWP. But I have a problem. In one of my programs, I allow the user to save its datas on its OneDrive. And if OneDrive is unavailable, the datas are stored on local devices. And when OneDrive is available, the newly stored datas are pushed to OneDrive. Synchronisation in fact. So it is the problem. In the UWP dll named Universal.Live I

HtmlAgility:no contents appeared (C#,UWP)

浪子不回头ぞ 提交于 2019-12-31 04:28:00
问题 i tried to use htmlagilitypack to parse a table,after i ve done i realized that i forgot to prove if htmlagility part works or not. ... and its obvious it doesnt work i also didnt know what have i missed and where have i done totally wrong... cause i m a beginner... so pls dont be too hard on me. public partial class WebForm1 : System.Net.Http.HttpClient { protected void Page_Load(object sender, EventArgs e) { System.Net.Http.HttpClient httpClient = new System.Net.Http.HttpClient(); string

[UWP]使用GetAlphaMask和ContainerVisual制作长阴影

落花浮王杯 提交于 2019-12-30 23:36:27
1. 什么是长阴影 前几年扁平化设计(Flat Design)十分流行,后来在扁平化的基础上又流行起了长阴影(Long Shadow)。长阴影其实就是扩展了对象的投影,感觉是一种光线照射下的影子,通常采用角度为 45 度的投影,给对象添加了一份立体感。长阴影快速发展为流行的设计趋势,并经常被应用到扁平设计方案的对象。它很适合用在较小的元素上,一时之间几乎应用的图标都加上了长阴影。(不过现在又不流行了) 2. 使用GetAlphaMask和ContainerVisual制作长阴影 要在UWP中制作长阴影的话,可以用GetAlphaMask拿到轮廓,做成灰色,然后复制一百几十个摆在后面。不过当然并不是直接创建这么多个UIElement,而是使用 ContainerVisual 类实现这个功能。 ContainerVisual 用于组合子级的Visual,只需简单地调用 VisualCollection.InsertAtBottom 即可。 下面是具体的实现例子,和上篇文章介绍的一样,首先在需要阴影的元素(TitleElement)后面放一个用于显示阴影的UIElement(ShadowElement),布局如下: <Grid Background="#FFE87A69" Padding="40" Margin="50" x:Name="ShadowRoot"> <Rectangle x