microsoft-metro

Windows App Store - Stretched icon

孤者浪人 提交于 2019-12-18 12:29:31
问题 I'm having a small problem with the windows store. I have uploaded all the required graphics in the submission, and the app has all of the required graphics (including box and wide tile images). In the store however, the app entry is using a wide image. The problem is that the wide image it's using is actually a box image , that's stretched. Any ideas what's going wrong? 回答1: I've been in touch with Microsoft support regarding this bug. It was fixed just two days ago. You just need to upload

What is _In_ in C++?

≡放荡痞女 提交于 2019-12-18 12:09:19
问题 I have searched this up rather a lot, but come up with no helpful results. I am currently trying to program simple DirextX game for Windows 8 Metro, and have come across _In_ rather a lot. I'm just wondering what it is. Also, I have seen a lot of the use of ^ as the pointer * which I found odd. On top of this, some classes have an interface of ref class MyClass , which I believe is for C# legibility. Anyway, any help would be brilliant. 回答1: It is a SAL annotation, used for code analysis. The

Calling MVC4 WebAPI methods from C# Metro UI Client using PostAsync, HttpClient & Json

妖精的绣舞 提交于 2019-12-18 11:30:17
问题 I've created a method using the new WebAPI features in MVC4 and have it running on Azure. The method requires that you post a simple LoginModel object that consists of a Username and Password property. Yes, I plan on securing this further once I get past this speed bump :-) The method then responds with an object in Json format: I can successfully call this method using Fiddler, provided that I include "Content-Type: application/json" in the Request Headers. It returns with 200 and I can go

Force WinRT app to snapped view

隐身守侯 提交于 2019-12-18 09:41:15
问题 For one of my apps I'd like to send the app to snapped view after tapping a button. As far as I know there's no public API available to send a running application to snapped view. Did anyone find a workaround to do this? Somehow it should be possible since you're able to do it in Windows 8 itself, and snap one of the running apps. Update: Being able to trigger a Win+. might do the same trick, but the SendKeys API isn't available in WinRT either. 回答1: Windows 10 has a ApplicationView

Reading file in Windows Metro javascript app

自作多情 提交于 2019-12-18 09:26:40
问题 Is this the right way to read the content of a file picked by a filepicker? I need to read the image data in order to send it to a webservice in my Windows Metro Javascript App. I use a readFile function with a callback that returns an evt parameter and then use encodeURIComponent(evt.target.result): document.getElementById("btnUpload").onclick = function () { var input = document.getElementById("file_input"); readFile(input.files[0], function(file, evt) { WinJS.xhr({ type: "post", url: "http

How to start a Process from a Win 8 App?

回眸只為那壹抹淺笑 提交于 2019-12-18 08:49:23
问题 I can’t find System.Diagnostics.Process to start a new process. I guess this is on purpose. But is there a other way? Is this even possible? 回答1: You can use this reference on Windows 8 Metro application : How to Start a external Program from Metro App. All the Metro-style applications work in the highly sand boxed environment and there is no way to directly start an external application. You can try using Launcher class Launcher.LaunchFileAsync // Path to the file in the app package to

Cannot implicitly convert type 'System.EventHandler' to 'System.EventHandler<object>' for storyboard complete

∥☆過路亽.° 提交于 2019-12-18 08:29:36
问题 I have read already a few threads about this, but I still don't know how to solve it in my case. I come from Java and mostly new to C# I want to attach listener when animation finishes: myStoryBoard.Completed += new EventHandler(onMyStoryBoardCompleted); And: private void onMyStoryBoardCompleted(object sender, EventArgs e) { } And I get the error in the title. I tried: myStoryBoard.Completed += new EventHandler<object>(onMyStoryBoardCompleted); But then I get: no overload for

Cannot implicitly convert type 'System.EventHandler' to 'System.EventHandler<object>' for storyboard complete

China☆狼群 提交于 2019-12-18 08:29:06
问题 I have read already a few threads about this, but I still don't know how to solve it in my case. I come from Java and mostly new to C# I want to attach listener when animation finishes: myStoryBoard.Completed += new EventHandler(onMyStoryBoardCompleted); And: private void onMyStoryBoardCompleted(object sender, EventArgs e) { } And I get the error in the title. I tried: myStoryBoard.Completed += new EventHandler<object>(onMyStoryBoardCompleted); But then I get: no overload for

Upload file to skydrive through SkyDrive API

巧了我就是萌 提交于 2019-12-18 04:23:39
问题 I try to upload a text file to my skydrive or at least create new text file in SD and edit it's content, through SkyDrive API in my Windows 8 application. How can I do that? I tried to do something like that: LiveConnectClient client = new LiveConnectClient(session); var fileData = new Dictionary<string, object>(); fileData.Add("name", "new_file.txt"); try { LiveOperationResult fileOperationResult = await client.PutAsync("me/skydrive", fileData); this.infoTextBlock.Text = fileOperationResult

Is it possible to await async tasks during a button click?

折月煮酒 提交于 2019-12-18 03:09:12
问题 I have a refresh button in my app that uses some async methods to update the list of items displayed. The problem is that I can't have a return type of Task for the event handler for the button click so I'm left with an async void method. Thus, the user can hit the refresh button, then select an item while the list is being repopulated which will result in an error. start of code that handles button click: private async void Button_Click_1(object sender, RoutedEventArgs e) { await ViewModel