windows-8

Prevent tablet from sleeping while app is running

≡放荡痞女 提交于 2019-12-07 06:12:17
问题 I'm trying to write a Windows 8 tablet app that often can go multiple minutes between receiving input. The problem is, that if i don't keep touching the screen, the power saver will activate, and the screen will automatically go black, and it disrupts the user of the app. Is there a way that my app can prevent the power saver from activating, or at least extend the time it takes for the power saver to activate. 回答1: You should use DisplayRequest class to keep screen from turning off. Apps

SDK error in Visual Studio Community 2015

浪子不回头ぞ 提交于 2019-12-07 06:07:00
问题 Upon rebuilding the solution to a file in Visual Studio exported from Construct 2 I received errors: MSB3774 Could not find SDK "Microsoft.WinJS.2.0, Version-1.0" MSB3774 Could not find SDK "Microsoft.WinJS.2.1, Version-1.0" 回答1: Open Visual Studio Click File->New Project Click Windows Click Windows 8 There will be an option there to install the Windows 8.1 tools. 来源: https://stackoverflow.com/questions/33715663/sdk-error-in-visual-studio-community-2015

Implementing State handling in windows 8 using MVVM Light

喜夏-厌秋 提交于 2019-12-07 05:40:57
问题 How i can implement state handling (running / resume / Terminate states ) using mvvm light. The major issue i a facing is with Navigation. I am totally uncontrolled with the navigation stack. How i can effectively manage this with MVVM Light. 回答1: You might be interested in the open source Okra App Framework that is freely available on CodePlex and NuGet (disclaimer: I am the lead developer on this project). This has been designed from the ground up for Windows 8 applications, in particular

Windows 8 XAML multi-column text

丶灬走出姿态 提交于 2019-12-07 05:23:40
问题 Is there a way to make columns in a text? I have one big string with the text i have to display, and i have a fixed height of the textblock, and have to make the text display in column. like this image: Thanks! 回答1: Have you looked in the "common" folder of the default solution templates? IIRC there is a control named something like ColumnTextBlock (or something similar) in there that does this for you. If it isn't in the default template you use, try creating a new grid application and look

Windows 8 XAML ListView with Header and Item Template columns should have same dynamic width

元气小坏坏 提交于 2019-12-07 05:13:29
问题 I am using a Listview with an Itemtemplate and a Headertemplate. Both templates contain 6 Columns. Everything is ok if i set a fixed column width for the templates - like in figure one. But i want to set the width to "Auto" for the items - but then i get figure 2... How to handle this? Is it possible to set the Header Column width with c#? - or any other solution? Figure 1: Figure 2: Code Listview: <ListView x:Name="DayanalyseListView" HorizontalAlignment="Center" VerticalAlignment="Top"

Windows 8.1 Metro app - Pinch and zoom an Image

£可爱£侵袭症+ 提交于 2019-12-07 04:53:09
问题 Is there any way to implement pinch and zoom the image control inside XAML in Windows 8.1, i am trying Manipulation delta event. But that event not get fired, also i tried setting ManipulationMode="All". <Image x:Name="kn" ManipulationMode="All" ManipulationDelta="kn_ManipulationDelta" HorizontalAlignment="Center" VerticalAlignment="Center" Height="315" Width="360" RenderTransformOrigin="0.5, 0.5"> <Image.RenderTransform> <CompositeTransform></CompositeTransform> </Image.RenderTransform> <

Chrome browser on Windows 8 desktop: touch support error

这一生的挚爱 提交于 2019-12-07 04:44:27
问题 Chrome browser (version 23.0.1271.97) on Windows 8 desktop is erroneously recognized as supporting touch events. Actually it is a desktop, that is to say, it doesn't support touch events. See for example Modernizr Touch tests: http://modernizr.github.com/Modernizr/touch.html Did anybody run into this problem? Is there a solution or a workaround? 来源: https://stackoverflow.com/questions/13934987/chrome-browser-on-windows-8-desktop-touch-support-error

What does version 255.255.255.255 for winmd files indicate?

核能气质少年 提交于 2019-12-07 04:38:23
问题 I noticed that most (all?) .winmd files have a version of 255.255.255.255 like: Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null Metro apps have a reference to such assemblies with this version number. Further the Windows.winmd itself references: mscorlib, Version=255.255.255.255, Culture=neutral, PublicKeyToken=b77a5c561934e089 However, an assembly with this version number does not exist, as far as I know. Does this version number have a special meaning? Is there any

Soft keyboard capital initially

淺唱寂寞╮ 提交于 2019-12-07 04:38:14
问题 I want that when a user taps on a TextBox the keyboard should be capital initially and then small case after entering first character. I have seen this in calendar app. When you tap on Add title the shift key is initially on and when you tap on Add a message it's off Here are the screen shots.. Screen shot #1 Screen shot #2 回答1: Here is a quick summary of the different InputScope types you can set for the on-screen keyboad. http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh393998

UnauthorizedAccessException while saving a file

点点圈 提交于 2019-12-07 04:38:01
问题 I have the following code in a Windows 8 C# app which fetches an image from a server and stores it: private async Task httpFetcher() { HttpClient httpClient = new HttpClient(); HttpRequestMessage request = new HttpRequestMessage( HttpMethod.Get, "http://www.example.com/fakeImageRotator.php"); // FOR EXAMPLE HttpResponseMessage response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); Uri imageUri; BitmapImage image = null; try { var imageFile = await