windows-10-mobile

Know when Windows 10 are Tablet Mode - Windows 10 / Windows 10 Mobile

家住魔仙堡 提交于 2019-12-10 10:18:38
问题 I work on Universal App for Windows 10 and Windows 10 Mobile. Does anyone know how to check if Windows 10 is running on Tablet Mode? I found this question here but that is for Windows Forms: How can I detect when Window 10 enters tablet mode in a Windows Forms application? Thanks 回答1: You query the UserInteractionMode - this is the sample code from that link switch(UIViewSettings.GetForCurrentView().UserInteractionMode) { case UserInteractionMode.Mouse: VisualStateManager.GoToState(this,

Create a Stopwatch Counter Control in Windows 10 Mobile App

我只是一个虾纸丫 提交于 2019-12-08 12:26:59
问题 I'm currently working on Windows 10 Mobile App And I want to make a stopwatch like this: I followed this tutorial: Create a StopWatch Counter control in WPF(XAML) But I'm working on Windows 10, so I can't use IMultiValueConverter Any suggestion to help me go through this.. Thank you so much. 回答1: Here is something with what you can start - in this post Arek Kubiak liked source to his arc which can be used for example like this: <Grid Background="{ThemeResource

Document support (rtf, doc, docx) for UWP/Windows 10 Mobile

家住魔仙堡 提交于 2019-12-07 12:12:37
问题 How can I display documents (doc, docx, rtf) in an UWP app? The WebView isn't able to do this. Other options would be calling an external application with Windows.System.Launcher.LaunchUriAsync (e.g. Word) or using a 3rd party library. The requirement is to have the data in the app, because you don't have control over it, if it's handled to another one. Another option would be to convert it to another format (e.g. PDF) which UWP can handle (not really). Any ideas? 回答1: If you would like to

Windows 10 Mobile (10.0.14393) Background Task for Geofence (LocationTrigger)

别说谁变了你拦得住时间么 提交于 2019-12-07 10:06:02
问题 Ever since 10.0.14393 (Anniversery Update), LocationTrigger does not seem to work. I have: A Windows Phone 8.1 application (also applies to a UWP application). A portable library that ouputs to a Windows Runtime Component library ( .winmd ) A declaration of Background Task with Location capabilities (set to the library as entry). Access with BackgroundExecutionManager.RequestAccessAsync() A LocationTrigger of type Geofence . The background task is never triggered. Registration/task code after

Is it possible to use a SQLite database in a shared folder in a PC?

醉酒当歌 提交于 2019-12-07 09:44:37
问题 I am developing an UWP application (Windows phone 10) and I have a SQLite database in a shared folder in a PC in my LAN. I would like to know if I can use this database in the windows phone app, like I do with my WPF application, that I can set the path of the database and I can use it from any computer in my lan. Thanks. 回答1: Short answer : Yes you can however you will need to be careful about the journaling mode you choose for example WAL does not work over a network file system. Long

Clear Back Stack Navigation Windows 10

谁说胖子不能爱 提交于 2019-12-06 22:12:24
问题 I want to Clear my Navigation Back Stack History ... I tried to use this.NavigationService.RemoveBackEntry(); but It didn't work. How could I do this in Windows 10? 回答1: If you're in page code behind, have you tried doing: this.Frame.BackStack.Clear(); or if you're somewhere else (like a ViewModel), have you tried: var frame = Window.Current.Content as Frame; frame.BackStack.Clear(); 回答2: In the code behind, you can try this: protected override void OnNavigatedFrom(NavigationEventArgs e){ if

Custom Panel with Reorder and animations / transitions

。_饼干妹妹 提交于 2019-12-06 15:33:51
问题 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. (app link) But, because I'm extending a basic Panel and using it as the ItemsPanelTemplate, I'm missing 2 things: Reorder and some transitions, that simply doens't work out of the box. See code: <GridView CanReorderItems="True" CanDrag="True" AllowDrop="True"> <GridView.ItemContainerTransitions>

How to get the system accent color for UWP-Apps?

流过昼夜 提交于 2019-12-06 14:08:20
问题 I'm trying to get the Accent Color of a user in a UWP-App for Windows 10. I know how to get it in C#, but I develop my apps in WinJS. So does anyone knows the WinJS equivalent for var color = (Color)Application.Current.Resources["SystemAccentColor"]; ? It would also be nice, if I could Access this Color with CSS. I found some hints, that color: Highlight; would be the solution, but this gives me only a blue and not the Accent Color. Thanks alot. 回答1: you can use WinRT API to do that : Windows

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

烈酒焚心 提交于 2019-12-06 13:22:28
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# 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 cellularMessaging capability, a special-use capability, to be declared in the package manifest, so this kind of app can

How to see (approximate) memory usage in an UWP App while it's running

拥有回忆 提交于 2019-12-06 02:20:35
问题 According to this article on Diagnosing memory issues with the new Memory Usage Tool in Visual Studio: 1. Memory caps on Phone devices : In particular for Phone, there are specific memory limits enforced on an application based on the size of the memory in the device. Allocating more than the specified limit will cause an OutOfMemoryException and will result in app termination. All well and good, and in Visual Studio you can use the Diagnostics tool to see memory usage during development. Is