win-universal-app

What is the equivalent to “OnBackKeyPress”

淺唱寂寞╮ 提交于 2019-12-04 04:34:22
In Windows Phone 8.0 I used this to handle the back button: protected override void OnBackKeyPress(CancelEventArgs e) { base.OnBackKeyPress(e); } This Event does not exists on the "Page" control. How can I handle a click on the back button in WP 8.1? Romasz Take a look at Windows.Phone.UI.Input.HardwareButtons . If you add a Basic Page to your project then VS will add a NavigationHelper class to your project which helps with Navigating thru your App, you can also see in the source code that it is subscribing to Windows.Phone.UI.Input.HardwareButtons.BackPressed . In case you want to extend

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

UWP - class PhoneLine not found [duplicate]

百般思念 提交于 2019-12-04 04:25:57
问题 This question already has an answer here : How to dial a Number in C# windows universal 10 (1 answer) Closed 3 years ago . I'm trying to make phone calls from my application. I'm supposed to use PhoneLine from namespace Windows.ApplicationModel.Calls; . But PhoneLine is not in Windows.ApplicationModel.Calls; , however according to documentation it should be there. When I add it to source code like Windows.ApplicationModel.Calls.PhoneLine this and hover over it, there is a hint saying: The

Is there a correct/recommended way of detecting my UWP app I'm running on a Phone?

梦想的初衷 提交于 2019-12-04 03:38:56
Trying out Windows Universal apps with JavaScript I noticed the WinJS.Utilities.isPhone property is no longer available, which makes sense since there would be no reason to ask for that at runtime. I do want to know just for testing purposes if there is a proper way of detecting the device my app is running in. EDIT: My question is NOT about detecting a mobile browser. I'm talking about about a brand new Universal Windows App for Window 10 that can run on phones, desktops, tablets, Xbox, HoloLEns, IoT devices et all. WinJS had a property that would tell me whether I was running on the phone or

Error when building universal app for the store: “Manifest references file 'MyAppName.dll' which is not part of the payload.”

被刻印的时光 ゝ 提交于 2019-12-04 03:37:07
I am having this error in Visual Studio 2015 when try to create app package for the store for a windows universal applicaiton: Manifest references file 'MyAppName.dll' which is not part of the payload. The error is in the ...\..MyAppSourcePath..\Package.appxmanifest file. This is somehow related Manifest references file 'Bing.Maps.dll' which is not part of the payload but in my case the error shows up only when build package for the store and is related to the MyAppName.dll (where MyAppName is the name of the name of my application). Another related question in MSDN: https://social.msdn

“Visual Studio update required” but its up to date

你。 提交于 2019-12-04 03:03:05
I have a fresh install of Visual Studio 2015 community with Windows 10 UWP SDK running in my computer. Recently I tried to open a project that I imported from another computer and when I launch the solution I get the next error message: Review Solution Actions Visual Studio update required One or more projects require a platform SDK (UAP, Version: 10.0.10586.0) that is either not installed or is included as pat of a future update to Visual Studio. Install the platform SDK to open these projects. When I click Ok, I see that all my projects in the solution explorer have the text (update required

Windows 10 IOT Lifecycle (or: how to property terminate a background application)

强颜欢笑 提交于 2019-12-04 02:49:10
In order to use a UWP application on a headless Raspberry Pi 2 with Windows 10 IOT Core we can use the background application template which basically creates a new UWP app with just a background task that is executed on startup: <Extensions> <Extension Category="windows.backgroundTasks" EntryPoint="BackgroundApplication1.StartupTask"> <BackgroundTasks> <iot:Task Type="startup" /> </BackgroundTasks> </Extension> </Extensions> In order to keep an application running, we can use the following startup code: public void Run( IBackgroundTaskInstance taskInstance ) { BackgroundTaskDeferral Deferral

How to change background overlay of ContentDialog uwp

守給你的承諾、 提交于 2019-12-04 02:21:48
问题 I am developing UWP Win10 App using VS2015. I am using ContenDialog to show a Modal Window / Popup. I need to change the Background Overlay color of ContentDialog. How to do this. There is no option/property even in the inner Style too. I need to change the Overlay White Dim color to some other color like Blackish overlay/dim color etc... See the pic. 回答1: I think you need custom use control to have more control over the background. The default ContenDialog provide very bare bone setup and

Can I embed a windows store app inside a classic windows application?

二次信任 提交于 2019-12-04 02:02:03
问题 I would like to embed a universal windows app into a classic windows application on windows 10. Is this possible? 回答1: The short answer is no. However... depending on what you're trying to do, the information below may help you. If you just want to get the look and feel of a desktop application, you should be aware that Windows 10 apps (unlike Windows 8 apps) run in non-fullscreen mode by default, and can be resized. Desktop apps in Windows 10 have top-right icons (min/max/resize) that look

C# - Get mac address in Universal Apps

北慕城南 提交于 2019-12-04 01:44:32
问题 I am developing a Windows 10 Universal App, and I need to get the mac address of the network adapters of the device on which the universal app will run. I looked a bit into MSDN but I could find a way to get the mac address, can anyone help me out with the code to get the mac address of network adapters in universal apps for windows 10? Thanks in advance. 回答1: Hmmm I wrote something but I didn't tested it on mobile device because I don't have any at the moment but I tested it on my PC and