windows-8

How often can a Windows 8 Live Tile be updated?

拜拜、爱过 提交于 2019-12-10 14:03:11
问题 I'm new to Windows 8 and I'm particularly interested in Live Tiles. I was wondering - How frequently can an app update a live tile? For example, is it possible to create a clock with seconds? 回答1: A Live Tile update every second is far too frequent. The MSDN guidelines for Live Tiles documentation does not set explicit limits on how often a tile can be updated, but does make a few recommendations about the frequency of updates. For an app with very frequently changing content, the highest

Global Dispatcher in WinRT?

帅比萌擦擦* 提交于 2019-12-10 13:55:20
问题 I have some WP7 code that looks like this: using System.Windows; using System.Windows.Threading; public static class GlobalDispatcher { public static Dispatcher Current { get { return Deployment.Current.Dispatcher; } } } What is the equivalent in WinRT? Is there no globally accessible Dispatcher (or CoreDispatcher) object? 回答1: You will want to use Window.Current.Dispatcher . 回答2: Just adding this as answer, as it better solves the problem in my opinion: Window.Current is null if the

Missing XPath in Windows Metro App

▼魔方 西西 提交于 2019-12-10 13:15:15
问题 Is there an easy way to perform XPath query's on XML in a Windows 8 metro app? System.Xml.XPath does not exist in the .NET framework used to create metro apps and after trying to use the HTMLAgilityPack I haven't been able to make any progress either. Are there an easy way to perform these query's? 回答1: I am not sure what you are trying to accomplish exactly, but you could try and leverage System.XML.Linq which provides access to XDocument, XElement, XName, XNode, XContainer etc and Parse

windows 8 app Share charm hangs on “Getting info from {AppName}”

我们两清 提交于 2019-12-10 13:14:06
问题 var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView(); dataTransferManager.addEventListener("datarequested", function (e) { var request = e.request; request.data.properties.title = "Share Link Example"; request.data.properties.description = "A demonstration that shows how to add a link (URI) to share."; request.data.setUri(new Windows.Foundation.Uri("http://www.google.com")); }); For some reason, if I click on the Share charm, it just hangs on

How to disable zoom in Windows 8 webviews

独自空忆成欢 提交于 2019-12-10 13:13:25
问题 I'm using a webview in an app to display externally hosted content, but the web view lets the user zoom with a pinch gesture and I'd like to disable this. I can't find any such property on the webview itself, and I've not had any success with a viewport meta tag such as: <meta name="viewport" content="user-scalable=no"> Is there a way to do this? 回答1: Unfortunately this is not possible. http://social.msdn.microsoft.com/Forums/en-AU/winappswithcsharp/thread/8eecf85d-ebd3-4bc0-ad17-15f342efad25

Targeting .NET 4.0 in VS 2012 on Windows 8

不打扰是莪最后的温柔 提交于 2019-12-10 12:18:45
问题 I just installed VS 2012 Ultimate RTM on Windows 8 Pro RTM and tried to open a solution containing several projects (class libraries and WinForms) targeting .NET 4.0. When the solution is loaded, VS prompts that .NET 4.0 isn't supported. It gives me the chance to update my projects to 4.5 (and promises that I could change the target later) or install a "Multi targeting pack" for 4.0 from this page. I decided to update my projects to 4.5 because I had no luck installing the offered Multi

how should a metro app cache images for tombstoning (and should it)?

两盒软妹~` 提交于 2019-12-10 12:13:57
问题 I have a c# metro app that downloads a collection of objects that have a property for a uri. This collection is bound to a ListBox with an Image source bound, this works fine. When the app is tombstoning, I want to preserve all app state including the collection and the images that have been downloaded from the internet. Covering the case, the users actions result in the collection being downloaded and displaying correctly they switch away to another app and the my app is terminated. The user

How do you actually implement the Search Contract? (C#)

ぐ巨炮叔叔 提交于 2019-12-10 11:49:10
问题 I'm having some trouble understanding and getting the search contract to work in my Store app. I have been unable to find any sort of documentation or guide that explains the structure of using the contract. (I've looked at the quickstarts on MSDN, the Search Contract sample and the build video, but that only really deals with javascript) So far I've been able to run a query and get a list (of Custom Objects) into my search contract page, and from there I try to assign that to

How to display the preview of 2 cameras in windows 8 using the MediaCapture class

你说的曾经没有我的故事 提交于 2019-12-10 11:49:04
问题 I want to be able to show the preview of several camera devices using the MediaCapture class. Currently I initialize the MediaCapture with a MediaCaptureInitializationSettings object which contains the device id. The settings object receives only 1 VideoDeviceId so I cannot set several video sources for the same MediaCapture object. Another thing I tried was to create several MediaCapture objects, one per device. However, it looks like the last one that gets initialized is the one who gets

How to draw above the Windows 8 Metro interface?

戏子无情 提交于 2019-12-10 11:42:23
问题 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