windows-8

Can't register a Time triggered Background Task

巧了我就是萌 提交于 2019-12-06 23:11:33
问题 For a Windows 8 App, in C#/Xaml I try to register a background task. It's hard to tell but I guess my background task is well registred but when I click on the name of my background task on the Debug Location Toolbar my app stops working without any message. I looked at the log on the Event Viewer and I get : "The background task with entry point MyApp.Pages.SampleBackgroundTask and name Example hourly background task failed to activate with error code 0x80010008." Here is my code : private

How to draw above the Windows 8 Metro interface?

雨燕双飞 提交于 2019-12-06 22:13:35
I would like to draw graphics that will reside above all other interfaces, including Windows 8 new Home screen. How would you go about doing that? With Windows 7 and down, it would be as simple as showing a transparent fullscreen window above all else, but now since the desktop is separated from the rest of the operating system it is not possible anymore. The reason is that I need to display two cursors independent of the Windows mouse cursor. I am developing a multi touch simulation software for a Wii Remote (using the sensor bar pointer), and for the moment I just set the cursor position and

Using async await inside void method

杀马特。学长 韩版系。学妹 提交于 2019-12-06 21:09:26
问题 I have method with signature I cannot change. It should be protected override void OnInitialize() Using Windows 8 Metro API I need to check if file exists and read it, inside this NoSignatureChange method. Using PlainOldCSharp, I would write something like protected override void OnInitialize() { ... try { var file = folder.OpenFile(fileName); fileExists=true; } catch(FileNotFoundException) { fileExists=false } } Remember, in Windows 8 API only way to check if file exists is handling

Windows 8 how to choose which camera to initialize

扶醉桌前 提交于 2019-12-06 20:37:27
I am developing a Windows Store App and I am using the Camera and Microphone capabilities. I would like the back camera to be initialized but the examples that I have found always initialize the front camera. Here's the code that I have: Windows.Devices.Enumeration.DeviceInformation.findAllAsync(Windows.Devices.Enumeration.DeviceClass.videoCapture) .done(function (devices) { if (devices.length > 0) { // Using Windows.Media.Capture.MediaCapture APIs to stream from webcam mediaCaptureMgr = new Windows.Media.Capture.MediaCapture(); mediaCaptureMgr.initializeAsync().done(initializeComplete,

Cookies not sent on Windows Phone app, but cookies are sent with same code in Windows 8 app

怎甘沉沦 提交于 2019-12-06 20:27:48
问题 I have a basic class that makes GET and POST requests using HttpWebRequest / HttpWebResponse . I use my class to login to an API and then request data. In a Windows 8 "Metro" application, it works exactly as expected. On a Windows Phone 8 application, the login appears to succeed, but in the subsequent request for data, no cookies are sent and the server responds as if the client is not logged in. Here is the class, this exact same code is used in the Windows 8 app and the Windows Phone app:

Getting a Type Assembly in Windows 8

风格不统一 提交于 2019-12-06 20:04:30
问题 I'm trying to use MEF in Windows 8. In order to build up my AssemblyCatalog for the container, I need a reference to the assembly. In the past, I would have just done this: var catalog = new AssemblyCatalog(typeof(App).Assembly); Mysteriously, the Assembly property no longer exists on the Type object. Anybody know of a good work around? Is there another way to get the assembly? I could load it using Assembly.Load , but I would need the name of the assembly. I can't get that from the type

Unit testing async method for specific exception

五迷三道 提交于 2019-12-06 17:57:06
问题 Does anyone have an example of how to unit test an async method in a Windows 8 Metro application, to ensure that it throws the required exception? Given a class with an async method public static class AsyncMathsStatic { private const int DELAY = 500; public static async Task<int> Divide(int A, int B) { await Task.Delay(DELAY); if (B == 0) throw new DivideByZeroException(); else return A / B; } } I want to write a test method using the new Async.ExpectsException construction. I've tried :-

Building Windows 8 Metro App on Windows 7 with Visual Studio 2010

吃可爱长大的小学妹 提交于 2019-12-06 17:48:16
问题 My Visual Studio can't seem to build any of the Metro Sample applications. As I've never really used this IDE before, I've pretty much given up. Can anyone direct me to a sample application that is already built and preferably some source code along with it for reference? Note: I have a copy of Windows 7 AND 8. However I can't seem to build Microsoft's File Access Sample in my copy of Visual Studio 2010 Ultimate. I'm trying to test one of my Win7 applications in Metro mode of Win8 (the

Give Java application a Metro Look and Feel in Windows 8 [closed]

孤街浪徒 提交于 2019-12-06 17:02:42
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I have already developed a Java application which is working well in Windows XP, Windows 7 & Windows 8 consumer preview. The

VS2012 Error on setup on Windows 8 - Visual C++ 2012 x86 Minimum Runtime cannot be found

倾然丶 夕夏残阳落幕 提交于 2019-12-06 16:33:27
I am getting a few errors trying to download the new VS2012. Its a fresh install of windows 8 (did the windows update). I have tried not selecting all (no C++, lightswitch, blend, office tools) I tried different mounting tools for the .ISO but no luck. VS2010 is still working. Running x86. Log file Errors: Critical: Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.507 Cannot find the requested object. Microsoft Visual Studio 2012 Pre-Clean Tool Cannot find the requested object Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.507 Cannot find the requested object. Microsoft Visual C++