windows-10-mobile

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

孤街醉人 提交于 2019-12-05 19:47:15
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? If you would like to display word or pdf files in the UWP app you can use WebView control with Google Docs Viewer - I was using it

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

女生的网名这么多〃 提交于 2019-12-05 18:24:45
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 You query the UserInteractionMode - this is the sample code from that link switch(UIViewSettings.GetForCurrentView().UserInteractionMode) { case UserInteractionMode.Mouse: VisualStateManager.GoToState(this, "MouseLayout", true); break; case UserInteractionMode.Touch: default: VisualStateManager.GoToState(this,

CachedFileUpdater doesn't work in OneDrive app on mobile?

你离开我真会死。 提交于 2019-12-05 14:38:47
There is a Cached File Updater contract which allows apps like OneDrive or DropBox to keep files in sync with remote repository when users change them though file pickers. It works roughly like this: User gets a file using FileOpenPicker. User changes file. The source app gets notification that file is changed and uploads new file to backing storage. However, while in official DropBox app this scenario works perfectly, in OneDrive app it doesn't. I'm getting UnauthorizedAccessException when try to get stream for read from a file. I understand some people actually able to change a file, but it

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

青春壹個敷衍的年華 提交于 2019-12-05 12:40:41
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. 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 answer : If you see yourself in a situation where many clients/programs need to access a common database over a

ContentDialog Windows 10 Mobile XAML - FullScreen - Padding

和自甴很熟 提交于 2019-12-05 02:50:55
问题 I put an ContentDialog in my project to use for Login Popup on Windows 10. When I run this project on mobile, ContentDialog not shown in full screen and have a minimal padding around this element.On keyboard is visible (on focus element textbox for example) exist margin between keyboard and content dialog Have any solution to how this on FullScreen? I set the property "FullSizeDesired" true, mas the problem is the same? Someone help to remove this: - Padding, - Full Screen My code are:

ExpanderView is expanded after page navigation

偶尔善良 提交于 2019-12-05 01:57:47
问题 I'm using a port of the WPF ExpanderView (ExpanderRT) in my UWP app to show expandable headers with items. This works fine when the app is launched for the first time and MainPage is initialized. However if I navigate to a new page and then go back to MainPage the ExpanderView looks like expanded, but not it's not showing the items. It should look the same as it was when MainPage was first initialized. I captured a GIF to show the behaviour. This is the XAML of the UserControl on the MainPage

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

混江龙づ霸主 提交于 2019-12-04 21:36:37
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. you can use WinRT API to do that : Windows.UI.ViewManagement.UIColorType enumeration provides all accents colors. You can make something like : var

Splash screen for universal windows 10 apps

本小妞迷上赌 提交于 2019-12-04 15:36:08
问题 I am creating a windows 10 universal app targeted for both Windows Phones and Windows Desktop, the problem I am facing on is when adding splash screen through the package.manifest file to the app, there is no option to add splash screen which fits the phone's portrait orientation (see the image below), And when I deploy the app on the phone the splash screen appears like shown below. 回答1: In this case, you will also want to specify the Background color , on your first screenshot. Read this -

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

拜拜、爱过 提交于 2019-12-04 07:21:32
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 there any way a UWP app running on a (Windows 10) phone can get an approximate idea of how much memory

UWP C# Disable Orientation Change Animation

大城市里の小女人 提交于 2019-12-04 04:26:45
问题 Is it possible to disable the 'screen rotating' animation that is executed when phone's rotation changes (from landscape to portrait or vice versa)? 回答1: you need to use DisplayInformation.AutoRotationPreferences = DisplayOrientations.LandscapeFlipped | DisplayOrientations.Landscape; you need to set the orientation in OnNavigatedTo of you pages, you can enable or disable different orientations depending of your pages or your requirements. Update: If you want to rotate the buttons like the