microsoft-metro

How to handle youtube deleted videos using youtube api from json request

元气小坏坏 提交于 2019-12-11 23:16:30
问题 I want to get youtube videos from youtube api using json request. Now i get videos from youtube using json. Example the url have some deleted videos (http://www.youtube.com/watch?v=MlOHWLqgcoY&list=PLD62D6701B15FD3E1) but i get only playing videos not deleted videos. Is it possible or any other way to handle youtube deleted videos using json results. This is my code to get youtube videos string getPlaylistVideoUrl = https://gdata.youtube.com/feeds/api/playlists/PLD62D6701B15FD3E1?v=2

What can cause GetFileAsync to hang?

那年仲夏 提交于 2019-12-11 19:58:13
问题 I've got a simple utility collection for a Windows Store application (a.k.a Metro), but I'm finding that it seems to hang when calling ApplicationData.Current.LocalFolder.GetFileAsync in succession (i.e. as soon as I try to debug it and step through, the problem disappears). public static async Task<LocalCache<T>> LoadCache() { try { // Get the input stream for the cache StorageFile file = await ApplicationData.Current.LocalFolder.GetFileAsync(GetFileNameForType()); using (IInputStream

How to detect ALT (Menu) button keydown on global page level in a WinRT app

本秂侑毒 提交于 2019-12-11 19:39:45
问题 I use following code to detect all key events in a WinRT app page: Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown; ... private void CoreWindow_KeyDown(CoreWindow sender, KeyEventArgs args) { //Handle key event } But the Alt (Menu in the VirtualKey enumeration) key does not trigger the CoreWindow.KeyDown event. It does also block any other key to trigger the event while pressed. Anyone know how to detect the Alt keydown event on a global page level in a WinRT app? 回答1: It seems to be

Pass color name as string in SharpDX.Color

浪尽此生 提交于 2019-12-11 19:12:46
问题 i am getting a color name as string (like "Black"). have to convert that color name as SharpDX.Color for my Metro app. now trying in following ways, 1)SharpDX.Color.FromRgba(int or uint value of color) 2)SharpDX.Color.FromArgb(int or uint value of color) is it possible to do this in this way.? or any other best way to done this.?? 回答1: Using Enum Parse and System.Drawing can help, it's not great but that would work: KnownColor colorenum = (KnownColor)Enum.Parse(typeof(KnownColor),"Black");

Select query of sqlite in metro app?

风格不统一 提交于 2019-12-11 19:05:48
问题 I have seen quite a number of examples describing the usage of SQLite in Metro app. Most of the examples have either Orderby/Insert/Delete statements. May I know how do I get the data from a pre-populated db using the Select statement? Secondly, how does someone store the data into an array or arrayList after the execution of the query? Kindly help me with this, Thanks. 回答1: See if this example is what you're looking for: return db.runAsync('SELECT * FROM Table'); Here is a pretty useful

How can I save an image from an ImageSource without downloading again?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 18:46:21
问题 this is an extension to my previous question how should a metro app cache images for tombstoning (and should it)? The solutions that I have been finding are to use HttpClient, but this results in an unnecessary second hit per file on the web server. Is there anyway to save the existing image/stream from a Image/ImageSource (using the ImageOpened event to ensure it is available) ? Solution must work with current RP API as this is an area where large changes have been made from CP. 回答1: First

Does anyone know of a QR Code Reader library for a Windows 8 Metro App?

我怕爱的太早我们不能终老 提交于 2019-12-11 18:08:00
问题 We're looking to read some QR codes in a Windows 8 Metro app. .NET libraries we've used in the past can't be referenced in WinRT/Metro and porting them won't be easy because they depend on System.Drawing which isn't in the .NET for Metro style apps. We looked at this by Benjamin Soulier but it didn't seem to work. Any other suggestions or something easy we're missing? Thanks 回答1: You can use ZXing.Net: http://zxingnet.codeplex.com/ For Metro apps based upon HTML5/Javascript I'm currently

MessageDialog closes Popup

ぃ、小莉子 提交于 2019-12-11 17:48:51
问题 in my Popup windows (contains game options control) I have "Reset HighScores" Button. Button fire a MessageDialog with a TextBlock "Are you sure that ..." and two Buttons "Yes" and "No". However, when MessageDialog opens, Popup closes. Do you know how to make popup still alive? 回答1: I was able to get around this using an Action delegate as a callback for when the MessageDialog is closed. The key is to call the Action after an await on MessageDialog 's ShowAsync in an async function. Another

Knowing the reason of DLL loading failed for Windows Store App

妖精的绣舞 提交于 2019-12-11 15:22:50
问题 I tried to use EmguCV library in Windows 8 Store App. Previously, it works fine for a Windows 7 Desktop App project. I ensure my Windows 8 Store App project directory [ C:\Projects\App2\App2\bin\Debug ] is having all the necessary DLLs file. When I execute directly in Microsoft Visual Studio 2012 Ultimate through Local Machine button, I get the following exception. Exception:Thrown: "Unable to load DLL 'opencv_core240': The specified module could not be found. (Exception from HRESULT:

About Metro GUI in desktop application

余生长醉 提交于 2019-12-11 15:06:52
问题 I am making a software that will support multiple features simultaneously. I know the logic, and I have developed the features to support. I want my project to have a look similar to Metro GUI of Windows 8. It need not to be specifically Metro, but similar. I know about all the layouts in standard Swing library. Currently I am using GroupLayout though. How should I proceed, any ideas? Because the UI seems dull and I don't want to use 3rd party APIs either. Any suggestions? 回答1: I personally