microsoft-metro

Order items horizontal in XAML GridView (Win8 / Metro)

試著忘記壹切 提交于 2019-12-21 03:02:08
问题 how can i sort the items of GridView horizontal in the XAML? Sadly i found no method to achieve this. The Keyword "Orientation" is not available. Here is my current GridView: <GridView x:Name="TestDataBinding" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" SelectionMode="None" ItemsSource="{Binding}" ItemTemplateSelector="{StaticResource itemTemplateSelector}" Margin="0,60,0,0" Width="1100" Height="540" /> Another Way could be a "VariableSizedWrapGrid". But this can't be

How can I make a Windows 8 Metro scrollviewer respond to mousewheel?

放肆的年华 提交于 2019-12-20 23:47:20
问题 I'm currently writing an app for Windows 8 using Metro and C#. In my app I use a combination of scrollviewer and gridview to show my data. My problem is however, how can I make it scrollable with a mouse wheel? In my searching I found MouseWheelParameters located in System.Windows.Input, but when I try to use the get_pageTranslation, it gives an error stating I can't explicitly use the get method. 回答1: The "get_pageTranslation" is actually the "PageTranslation" property on the

Is there any way to write a WinRt (Metro) app that will also work on Windows 7 and Vista?

白昼怎懂夜的黑 提交于 2019-12-20 16:50:45
问题 We can’t just leave our customers that are not able to upgrade to windows 8 for a long time in the larch. However there is demand for a “tablet”/”touch” version of our app. So how can we support both touch with Metro on Windows 8 and our current customers from a single code base? When WPF come out, after a lot of “Pushing” Microsoft saw since and make it work on Windows XP – has anything like this been talked about for WinRT. (I am not expecting any solution to work on XP, as XP support is

Is there any way to write a WinRt (Metro) app that will also work on Windows 7 and Vista?

十年热恋 提交于 2019-12-20 16:50:14
问题 We can’t just leave our customers that are not able to upgrade to windows 8 for a long time in the larch. However there is demand for a “tablet”/”touch” version of our app. So how can we support both touch with Metro on Windows 8 and our current customers from a single code base? When WPF come out, after a lot of “Pushing” Microsoft saw since and make it work on Windows XP – has anything like this been talked about for WinRT. (I am not expecting any solution to work on XP, as XP support is

Metro App - How to detect if logged in with Live ID or Local Account

泪湿孤枕 提交于 2019-12-20 15:25:55
问题 I am building a Metro C# SkyDrive API on top of the Live Connect SDK (http://msdn.microsoft.com/en-us/live/default) - in Windows 8 the user has the choice to SignIn to the Windows 8 machine with either a LOCAL account, or a LIVE account. When using the Live Connect SDK, if I call // assume wlscopes is properly set LiveAuthClient liveAuthClient = new LiveAuthClient(); LiveLoginResult loginResult = await liveAuthClient.LoginAsync(wlscopes); // do some stuff on skydrive liveAuthClient.Logout();

Emulates Windows 8 Start Menu Tile Layout Engine

天涯浪子 提交于 2019-12-20 10:17:05
问题 So anyone out there knows of sample code or control that perfectly emulates the Windows 8 Start Menu Tile Layout Engine? It should support mixed Square and Rectangle Tiles, and repacks the square tiles over or under rectangle tiles properly. Note: WrapPanel works if ALL TILES are Square. But once you mix in tiles that span 2-Squares worth of space, the layout breaks, and is inconsistent with the Windows 8 Start Menu I am expecting code that extends the WPF Panel. Disclaimer: Yes I have

How to a synchronize tasks?

徘徊边缘 提交于 2019-12-20 10:11:59
问题 Say I have an async method which saves to file: async Task SaveToFileAsync() { var file = await folder.GetFileAsync ( ...) var stream = file.OpenFileAsync(...) ///etc } Now imagine that SaveToFileAsync is called twice simultaneously. This is a problem because you can't write on the same file simultaneously If this were a regular method, lock() would fix this: void SaveToFile() { lock(something) { /// code here } } However, lock is not allowed in an async method. Of course, one could call

Unable to access Asset files in Metro app

心已入冬 提交于 2019-12-20 04:28:19
问题 I am trying to read a text file, which is shipped as an asset in a Metro app. I am receiving an access denied error, if specifying the file path as "ms-appx:///Assets/file.txt". Clearly I need to set some capability to access installation location folder. I tried enabling all capabilities in manifest designer, but still the same error. Please suggest. 回答1: Try this: StorageFile file = await StorageFile.GetFileFromApplicationUriAsync( new Uri("ms-appx:///Assets/file.txt")); Stream stream =

Get HTTP-only cookie from Windows 8 JS App

好久不见. 提交于 2019-12-20 04:16:42
问题 I am making a Javascript Windows 8 app in which the user connects to my server and logs in. Currently, I am trying to use the XmlHttpRequest Object to do so (specifically, WinJS.xhr) but when I get the output of getAllResponseHeaders(), the Set-Cookie header isn't there (because it is an Http-only cookie). Is there any way to get http-only cookies from a JS Windows 8 app? All help is greatly appreciated and I always accept an answer! 回答1: As it turns out, Windows 8 apps are already able to

Can an APPX Windows Store Package contain multiple “applications”?

这一生的挚爱 提交于 2019-12-20 04:06:30
问题 I'm trying to understand the appxmanifest file for APPX packages better. I noticed it has an <Applications> tag followed by a single <Application> tag for every example I've seen. It would appear though that multiple "applications" can be included in the Manifest. What would this actually even mean though? Is this actually possible or was Microsoft just thinking about forward compatibility when designing the AppxManifest schema? 回答1: The manifest does define this as a possibility, and with