windows-10-mobile

How to detect airplane mode programmatically in windows phone 10

…衆ロ難τιáo~ 提交于 2019-12-23 02:38:30
问题 ITNOA I want to detect airplane mode in windows phone 10 ( Universal Windows Application ) programmatically. Is there any way? thx 回答1: You can use this documentation and MobileBroadbandRadioState enum for UWP apps but it's reserved for mobile operators and you can't use it in app you want to upload to Store. First, you have to edit Package.appxmanifest file and add rescap namespace <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas

Is there any way to fetch Mobile Number of windows phone 10 using c#

泪湿孤枕 提交于 2019-12-22 17:33:40
问题 I have created my application in UWP. I need to search current sim and sim Mobile number. Please help me for find the mobile number using windows phone 10 in c# 回答1: Yes, it is possible. You can use SmsDevice2.AccountPhoneNumber to get the phone number. From this article,Pay attention of This functionality is only available to mobile operator apps and Windows Store apps given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. Hence it requires the

How to create a custom VirtualizingPanel on Windows Phone 8.1 / Windows 10?

喜欢而已 提交于 2019-12-22 06:59:32
问题 I'm trying to do this in Windows 10 and Windows Phone 8.1 (app link): I have a custom class called FluidPanel that extends Panel and overrides methods MeasureOverride and ArrangeOverride. The goal is to create the Google Keep appearence. Ok, it's working fine. But, because I'm using a basic Panel as the ItemsPanelTemplate , the items Reorder doesn't work. Also, transistions doesn't work and it doesn't virtualize. So, I would like to know how to create a custom panel that reorder items and

UWP: async read file into byte[]

半城伤御伤魂 提交于 2019-12-22 04:56:24
问题 I want to read a locally stored file into a byte array. How do I do that? This is my try: StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(filePath); var file = await folder.GetFileAsync(filePath); var buffer = await FileIO.ReadBufferAsync(file); DataReader dataReader = Windows.Storage.Streams.DataReader.FromBuffer(buffer); // doesn't work because ReadBytes wants a byte[] as parameter and also isn't asynchronous byte[] result = dataReader.ReadBytes(buffer.Length); 回答1:

UWP: async read file into byte[]

元气小坏坏 提交于 2019-12-22 04:56:02
问题 I want to read a locally stored file into a byte array. How do I do that? This is my try: StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(filePath); var file = await folder.GetFileAsync(filePath); var buffer = await FileIO.ReadBufferAsync(file); DataReader dataReader = Windows.Storage.Streams.DataReader.FromBuffer(buffer); // doesn't work because ReadBytes wants a byte[] as parameter and also isn't asynchronous byte[] result = dataReader.ReadBytes(buffer.Length); 回答1:

ToogleMenuFlyout and MenuFlyoutPresenterStyle Set Width - Windows 10 Mobile

那年仲夏 提交于 2019-12-20 05:54:47
问题 I need the items in a ToogleMenuFlyout occupy the full width of the screen. But I'm not solve the problem. I'm trying to put the width of my Grid (Grid Main page) but I do not get to do in code-behind. I am applying a style to MenuFlyoutPresenterStyle but also not to give. my code is: AppBarButton x:Name="FiltersPhone" Icon="Filter" Label="Names"> <AppBarButton.Flyout> <MenuFlyout> <MenuFlyout.MenuFlyoutPresenterStyle> <Style TargetType="MenuFlyoutPresenter"> <Setter Property="Background"

Turn off soft keyboard in uwp app for windows

旧街凉风 提交于 2019-12-20 03:36:28
问题 I have an uwp app running on a handheld device running windows 10. The handheld device has a barcode scanner and all input for the app is made using this. So I want to prevent the keyboard coming up when a user moves the focus to any of the textbox controls. To a large extent, the focus is handled programmatically - and I have prevented the keyboard coming up in those instances with PreventKeyboardDisplayOnProgrammaticFocus=True . But the user does need to move the focus himself sometimes and

Access to file denied on app's second run

倖福魔咒の 提交于 2019-12-20 03:08:39
问题 I'm facing a weird issue, when trying to access file on SD card with code: var path = @"D:\Test\test.txt"; try { StorageFile file = await StorageFile.GetFileFromPathAsync(path); } catch (Exception ex) { Debug.WriteLine($"File access failed due to {ex.Message}"); } path = @"Test\test.txt"; StorageFile file2 = await (await KnownFolders.RemovableDevices.GetFoldersAsync()).FirstOrDefault().GetFileAsync(path); The file is on SD card, I've declared RemovableStorage capability, and added

Install 2 versions of same Windows 10 Universal App in the same OS instance

↘锁芯ラ 提交于 2019-12-20 01:13:17
问题 We are developing a Windows 10 Universal app. Currently, there are 2 branches of the app code, MAIN and DEV. We would like to be able to install (and run) both builds on the same OS instance at the same time. Right now, we do not see any other way of doing this than having a separate VM for each app build, but this is not our preference. Does anyone have any experience with this type of challenge, and does anyone know if this is even possible from technology standpoint? 回答1: Each package must

Set Icon on SecondaryCommand of CommandBar

帅比萌擦擦* 提交于 2019-12-19 08:04:25
问题 I have a command bar width secondary commands: <CommandBar> <AppBarButton Icon="Back" Label="Back" Click="AppBarButton_Click"/> <AppBarButton Icon="Stop" Label="Stop" Click="AppBarButton_Click"/> <AppBarButton Icon="Play" Label="Play" Click="AppBarButton_Click"/> <AppBarButton Icon="Forward" Label="Forward" Click="AppBarButton_Click"/> <CommandBar.SecondaryCommands> <AppBarButton Icon="Like" Label="Like" Click="AppBarButton_Click"/> <AppBarButton Icon="Dislike" Label="Dislike" Click=