windows-10-mobile

x:Bind image with null string

吃可爱长大的小学妹 提交于 2019-11-29 06:51:23
问题 In XAML I have the following line: <Image x:Name="MainImage" Source="{x:Bind ViewModel.MainPic,Mode=OneWay,TargetNullValue={x:Null}}" Stretch="UniformToFill"/> In ViewModel: public string MainPic { get { if (Data == null) return default(string); else return Data.Photos.ElementAtOrDefault(0).url; } } App compiles fine but during execution (since Data is populated after few seconds), the app crashes with the following exception: System.ArgumentException: The parameter is incorrect. Debugger

How to check Isolated Storage of Windows 10 mobile emulator?

送分小仙女□ 提交于 2019-11-29 00:39:50
I am currently working on Windows 10 and my requirement is to check isolated storage of Windows 10 Mobile emulator. With Windows Phone 8/8.1, its possible using IsolatedExplorerTool which we can use using Command Prompt. Can anyone suggest, how I can achieve the same for Windows 10 Emulator ? The IsolatedStorageExplorer tool (ISE) for WP8.1 works just fine with W10m apps (you will find it at C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\IsolatedStorageExplorerTool ). You probably know how to use it, but just in case someone needs some explanation: You will have to run it from

Accessing storage of simulator/device while debugging

你。 提交于 2019-11-28 11:39:47
I created an UWP project, where I store a file in the cache directory: string writeFilePath = Path.Combine(ApplicationData.Current.LocalCacheFolder.Path, "test.jpg"); await Task.Run(() => File.WriteAllBytes(writeFilePath, image)); Now I want to view the saved image, but I have no access to it. How do I access it from the simulator or directly on the device (Windows 10 Mobile phone)? Perhaps one could copy the file from the device to the local PC? I tried the IsolatedStorageExplorer , but I only get the following devices: 0 Device 1 Emulator 8.1 WVGA 4 inch 512MB(DE) 2 Emulator 8.1 WVGA 4 inch

Windows 10 Mobile Error: DEP6200

假装没事ソ 提交于 2019-11-28 08:09:05
问题 I am trying to deploy a Windows 10 app to a Lumia 635 running 10.0.10586.11 and I get this error: Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device 'DEVICE GUID'.': SEHException - External component has thrown an exception. Error : DEP6200 : Bootstrapping 'Device' failed. Device cannot be found. The data necessary to complete this operation is not yet available. Unlike most, I am capable of deploying to an Emulator, just not the

Extended execution not working properly?

自闭症网瘾萝莉.ら 提交于 2019-11-28 02:35:33
问题 I'm not able to get ExtendedExecution to work properly. The problem is that the Revoked event is not being fired until the execution is finished. If we take a sample: private async void OnSuspending(object sender, SuspendingEventArgs e) { Debug.WriteLine("Suspending in app"); var deferral = e.SuspendingOperation.GetDeferral(); using (var session = new ExtendedExecutionSession()) { session.Reason = ExtendedExecutionReason.SavingData; session.Description = "Upload Data"; session.Revoked += (s,

How to detect is a camera is available using isTypePresent in a Windows 10 Universal Application

对着背影说爱祢 提交于 2019-11-28 01:06:52
问题 When developing a Universal Application for Windows 10 you are encouraged to detect device specific hardware using IsTypePresent . (Microsoft refer to this feature as 'Light up'). An example from the documentation that checks for a device's back button is: if(Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; It is clear here that the string "Windows.Phone.UI

how to read a text file in windows universal app

天大地大妈咪最大 提交于 2019-11-27 23:14:52
I am trying to read a text file named thedata.txt that has a list of words that I want to use in a hangman game. I have tried different ways, but I can't figure out where the file gets placed, if at all when the app runs. I added the file to my project, and I have tried setting the build properties to content, and then embedded resource, but can't find the file. I have made a Windows 10 universal app project. The code I tried looks like this: Stream stream = this.GetType().GetTypeInfo().Assembly.GetManifestResourceStream("thedata.txt"); using (StreamReader inputStream = new StreamReader(stream

Windows 10 UWP - detect if the current internet connection is Wifi or Cellular?

亡梦爱人 提交于 2019-11-27 19:47:32
In Windows 10 UWP app how do I detect if the current internet connection is Wifi or Cellular? In UWP you can check network connectivity using the IsWlanConnectionProfile or IsWwanConnectionProfile properties. An example would be: var temp = Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile(); if (temp.IsWlanConnectionProfile) { // its wireless }else if (temp.IsWwanConnectionProfile) { // its mobile } I hope this helps. Other than just getting the connectivity (that others have mentioned) you can also handle metered connections better. How to manage metered network

How to develop windows 10 uwp on real device (mobile)?

。_饼干妹妹 提交于 2019-11-27 09:04:32
I'm trying to debbuging my app on real device (lumia 830 with windows 10 mobile 10.0.10581.0) Developer Mode is ON on both devices (mobile and PC), but when i'm trying to emulate app on my device I've got an error (DEP6100 and DEP6200). However i can easily emulate on emulators and my PC. Can't understand what's the problem. Has anyone been able to successfully deploy a UWP app on phone and debug it? How to register your phone for development for Windows 10 mobile? I faced the same problem yesterday and I solved applying this: Create a Registry Key in: [HKEY_LOCAL_MACHINE\SYSTEM

Accessing storage of simulator/device while debugging

落花浮王杯 提交于 2019-11-27 06:26:26
问题 I created an UWP project, where I store a file in the cache directory: string writeFilePath = Path.Combine(ApplicationData.Current.LocalCacheFolder.Path, "test.jpg"); await Task.Run(() => File.WriteAllBytes(writeFilePath, image)); Now I want to view the saved image, but I have no access to it. How do I access it from the simulator or directly on the device (Windows 10 Mobile phone)? Perhaps one could copy the file from the device to the local PC? I tried the IsolatedStorageExplorer, but I