windows-store-apps

“The high OS version validation detected” error during Windows App Certification Kit validation

久未见 提交于 2019-12-10 15:59:35
问题 Getting the following test failure while running Windows App Certification Kit 10.0 : Platform version launch Error Found: The high OS version validation detected the following errors: Cannot launch App The app <apppackagename> failed platform version launch test. Impact if not fixed: The app should not use version information to provide functionality that is specific to the OS. How to fix: Please use recommended methods to check for available functionality in the OS. See the link below for

Windows (Phone) 8.1 Camera Use

瘦欲@ 提交于 2019-12-10 15:06:59
问题 I am creating a Windows Universal application. I want to the user to be able to upload a picture and the user should have the option of taking one on the spot and sending that. I have this working using the MediaCapture api. However I can only seem to use one camera, so for example if my phone has a front and a back camera only the front camera is used. How would I be able to switch the camera that is in use? I had read something somewhere about using something like this: private static async

Zooming into image in Windows Store apps

谁都会走 提交于 2019-12-10 14:52:22
问题 I have a ScrollViewer with an Image Control in it. It displays a rather large image. I want my user to be able to zoom into the image using gestures. I therefore enabled the ZoomMode on the Scrollviewer. However the Scrollviewer automatically scrolls back to the left "edge" of the image whenever the user releases its finger, making effectively zooming in and out of the image impossible. This is the Template i am using: <DataTemplate x:Key="SingleItemTemplate"> <ScrollViewer ZoomMode="Enabled"

Convert ImageSource to WriteableBitmap in Metro Windows 8

天大地大妈咪最大 提交于 2019-12-10 14:43:02
问题 I was wondering how I could go about converting an ImageSource object (in my case the source property of an image element) to a WriteableBitmap . The WriteableBitmap(BitmapSource) constructor doesn't work in Windows 8 Metro, so I can't do that. I've tried to load the ImageSource object into a stream and then use WriteableBitmap.SetSource(stream) , but I can't figure out how do load the image in a stream either. InMemoryRandomAccessStream ras = new InMemoryRandomAccessStream(); BitmapEncoder

Disable navigation on FlipView

落爺英雄遲暮 提交于 2019-12-10 14:16:18
问题 I would like to disable all navigation on my FlipView (scrolling horizontally) from user's input (e.g. mouse wheel and touch screen). The only way the flipview is supposed to change its selected index is programatically, I have already removed the side buttons in the FlipView 's style. I tried changing some of the ScrollViewer 's properties in its style but I can't manage to block everything. Anybody can hint me the correct and clean way to do this? 回答1: I found the solution by overriding the

Windows Phone app crashes only if downloaded from the store

自古美人都是妖i 提交于 2019-12-10 14:12:09
问题 I have a really strange problem, I developed a windows phone app that works perfectly if installed from visual studio... I uploaded on the store as beta, installed from the store, but the app crashes always on splashscreen! Thanks 回答1: If you're application uses a periodic Background Agent and you are testing it with the LaunchForTest method you should make sure that you are not calling this in your release build of the code. Protect it with appropriate conditional compile time checks: #if

C++ equivalent of .NET's Task.Delay?

醉酒当歌 提交于 2019-12-10 13:54:42
问题 I'm writing a C++/CX component to be consumed by Window's store Apps. I'm looking for a way to accomplish what Task.Delay(1000) does in C#. 回答1: Old Question, but still unanswered. You can use #include <chrono> #include <thread> std::this_thread::sleep_for(std::chrono::milliseconds(1000)); This will need C++11, which shouldn't be a problem when using C++/CX. 回答2: I'm not going to claim to be a wizard - I'm still fairly new to UWP and C++/CX., but what I'm using is the following: public ref

Preprocessor definitions for Universal Windows Platform?

ぐ巨炮叔叔 提交于 2019-12-10 13:37:19
问题 We have a C++ library, and we received a few requests to support UWP. I'm investigating the port now. I'm looking through Microsoft's C/C++ Preprocessor Reference | Predefined Macros for Visual Studio 2015, but I don't see anything related to UWP. I found How to: Use Existing C++ Code in a Universal Windows Platform App, but they look like the old defines for those Metro UI apps: WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP) WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP) WINAPI_FAMILY

Is there a way to avoid using hard-coded resw keys with the windows store app ResourceLoader?

我是研究僧i 提交于 2019-12-10 12:27:02
问题 Is there a way to avoid using hard-coded keys for the globalized strings contained in the resw file within a windows store app? i.e. // I have to use a hard-coded string key, which may violate the // DRY principle to gain access to the translation from C#: var translation = Windows.ApplicationModel.Resources.ResourceLoader.GetString("MyStringKey/Text") 回答1: You can use the T4 template below to automatically generate a C# wrapper around your resw file. This means you have no need to litter

Get protocol activation args in “Project Centennial” app

浪尽此生 提交于 2019-12-10 12:16:15
问题 How can I access the protocol activation arguments in a Winforms app that's converted into a UWP app? The problem is that the OnActivated method is absent so I can't get the IActivatedEventArgs . 回答1: I'm assuming you want to handle file types in which case you can check Environment.GetCommandLineArgs() as normal for arguments. The second argument will be the file or protocol activated. 回答2: How can I access the protocol activation arguments in a Winforms app that's converted into a UWP app?