windows-8

Starting multiple async/await functions at once and handling them separately

…衆ロ難τιáo~ 提交于 2019-12-29 08:33:27
问题 How do you start multiple HttpClient.GetAsync() requests at once, and handle them each as soon as their respective responses come back? First what I tried is: var response1 = await client.GetAsync("http://example.com/"); var response2 = await client.GetAsync("http://stackoverflow.com/"); HandleExample(response1); HandleStackoverflow(response2); But of course it's still sequential. So then I tried starting them both at once: var task1 = client.GetAsync("http://example.com/"); var task2 =

Determine when a Windows 8 app is launched by Notification

流过昼夜 提交于 2019-12-29 07:53:20
问题 I have notifications going to my application, I want to be able to take the user to that page in my application when they click on the notification or live tile (current displayed item). Is there a way to determine what the tile data is when your app is launched from a Live Tile or Toast Notification? Also, users have the ability to right click on a live tile and turn it off. Is there a way to detect that so I can turn off sending them live tiles or does WNS handle that? Thanks! 回答1: Windows

Determine when a Windows 8 app is launched by Notification

穿精又带淫゛_ 提交于 2019-12-29 07:53:12
问题 I have notifications going to my application, I want to be able to take the user to that page in my application when they click on the notification or live tile (current displayed item). Is there a way to determine what the tile data is when your app is launched from a Live Tile or Toast Notification? Also, users have the ability to right click on a live tile and turn it off. Is there a way to detect that so I can turn off sending them live tiles or does WNS handle that? Thanks! 回答1: Windows

Control Styles and Templates for Windows 8 Metro-UI

a 夏天 提交于 2019-12-29 07:11:32
问题 I've met some issue with the visual appearance of my C#/XAML Metro-UI application. I want to customize default template. For another type of applications, I can take default styles and controls from MSDN articles. For example: Control Styles and Templates for WPF Control Styles and Templates for Silverlight Where can I find something similar for Metro-UI default styles and templates? I know that is possible to extract template or style in Expression Blend. But I get the issue with my Blend

Unable to start debugging - Visual Studio 2012

浪尽此生 提交于 2019-12-29 06:48:13
问题 "Unable to start debugging 'C:\Windows\System32\WWAHost.exe'. The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging." Searched for similar posts, but didn't found one. If duplicate just inform. I am not trying to connect to any remote machine. Just testing on my local machine. Is

Async and Await with HttpWebRequest.GetResponseAsync

只谈情不闲聊 提交于 2019-12-29 06:40:23
问题 I am trying to use Async and Await when making a web request and am finding that it never gets past the await line. I am doing this from a Metro app, but I also verified the problem in a winforms app. public async Task<string> DoSomething() { string url = "http://imgur.com/gallery/VcBfl.json"; HttpWebRequest request = HttpWebRequest.CreateHttp(url); var ws = await request.GetResponseAsync(); return ws.ResponseUri.ToString(); ; } If I don't use await and instead perform a synchronous wait, it

Async and Await with HttpWebRequest.GetResponseAsync

删除回忆录丶 提交于 2019-12-29 06:40:11
问题 I am trying to use Async and Await when making a web request and am finding that it never gets past the await line. I am doing this from a Metro app, but I also verified the problem in a winforms app. public async Task<string> DoSomething() { string url = "http://imgur.com/gallery/VcBfl.json"; HttpWebRequest request = HttpWebRequest.CreateHttp(url); var ws = await request.GetResponseAsync(); return ws.ResponseUri.ToString(); ; } If I don't use await and instead perform a synchronous wait, it

How to apply image effects like edge detection oncamera stream in Windows 8 app?

為{幸葍}努か 提交于 2019-12-29 06:30:11
问题 I am trying to apply image manipulation effects in Windows 8 app on camera feeds directly. I have tried a way using canvas and redrawing images after applying effects getting from webcam directly. But this approach works fine for basic effects but for effects like edge detection its creating large lag and flickering while using canvas approach. Other way is to create MFT(media foundation transform) but it can be implemented in C about which i have no idea. Can anyone tell me how can i achieve

Difference between ListView and ListBox in Visual Studio

試著忘記壹切 提交于 2019-12-29 05:45:48
问题 What is the difference between "ListView" and "ListBox" in a "Windows 8" app. 回答1: The ListBox is an older control primarily for compatibility with other xaml frameworks. The ListView has build-in functionality for touch etc. Use the ListView unless you have a specific need for the ListBox See here for more detail. Specific events available only for ListView : DragItemsStarting ItemClick Methods: CompleteViewChange CompeteViewChangeFrom CompleteViewChangeTo InitializeViewChange

ASP.Net Inproc session restarted after markup change in VS2012

夙愿已清 提交于 2019-12-29 04:37:21
问题 I upgraded my development machine to Windows 8 and Visual Studio 2012. I'm testing my ASP.Net applications (also upgraded to .net 4.5) on a local IIS. One thing that is annoying me, that hasn't been this way with my last configuration (Windows 7, VS 2010, .net 4.0), is that InProc-sessions are being restarted after changes in markup files. Example: I'm logged into my local ASP.net application, make and save changes in a *.ascx file, refresh my webbrowser and the session is gone. How do I turn