uwp

Getting SPI temperature data from outside of class

痞子三分冷 提交于 2019-12-23 02:51:03
问题 I'm trying to write a class "Temperature" that handles communicating with my RaspberryPi through SPI to read some temperature data. The goal is to be able to call a GetTemp() method from outside of my Temperature class so that I can use temperature data whenever I need it in the rest of my program. My code is set up like this: public sealed class StartupTask : IBackgroundTask { private BackgroundTaskDeferral deferral; public void Run(IBackgroundTaskInstance taskInstance) { deferral =

How to maximize a UWP window (not fullscreen)

橙三吉。 提交于 2019-12-23 02:44:35
问题 How can I maximize a window in a UWP project (not fullscreen!) using C#? I tried the method TryResizeView with the window bounds as parameters but nothing happens. Thanks 回答1: This is not possible in UWP at this time. So, I can't get you Maximize, but I can get you pretty close: var av = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); var di = Windows.Graphics.Display.DisplayInformation.GetForCurrentView(); var bounds = av.VisibleBounds; var factor = di.RawPixelsPerViewPixel;

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

Using openCV on a UWP Windows 10 Application

好久不见. 提交于 2019-12-23 02:34:41
问题 Is there a way to use OpenCV libraries on a UWP application for Windows 10 without needing to create my own wrappers around openCV or purchasing Emgu CV wrappers? I am aware that there is Android and iOS support (as stated in their page) but no reference for UWP or Windows 8 store apps whatsoever. It just states that Windows is supported. 回答1: Yes there is, but I think it is not offical yet, or maybe not finished/tested. It is developed at Microsoft and most of it should be merged into master

UWP resource strings at design time (.resw)

会有一股神秘感。 提交于 2019-12-23 02:18:32
问题 I've created a .resw file by following the instructions at https://docs.microsoft.com/en-us/windows/uwp/globalizing/put-ui-strings-into-resources. While the localization works fine at runtime, no text is displayed at design time. The only solution proposed so far seems to only work in windows 8.1 apps: Windows store app ResourceLoader at design time 回答1: The New Method of solution that you have mentioned also works in UWP. And it's more recommended to use Data Binding at design time. The

Packaging WinForms application along with native DLL

微笑、不失礼 提交于 2019-12-23 02:13:10
问题 Trying to figure out how to package the following solution with Visual Studio 2017 Desktop Bridge (Application Packaging Project): .NET Library DLL. WinForms executable referencing 1. Native C++ DLL exporting some functions used by 1 and 2 with [DllImport]. I added project 2 to Applications section of a package and buit it. In the target folder I have EXE (from project 2) and DLL (from project 1). And the question is: how to correctly add the project 3 (native c++ library) to a package? I

System.Diagnostics.Process not working in Windows 10

a 夏天 提交于 2019-12-23 02:03:44
问题 I'm working in a UWP app in which I need to launch Microsoft Edge or Internet Explorer when the users clicks on a button. I've found that the way to do it is calling the System.Diagnostics.Process.Start() but I get: The type or namespace name 'Process' does not exist in the namespace 'System.Diagnostics' I've tried to install it with NuGet but I've gotten several Exceptions also... I've also tried using Launcher, but it hasn't done anything: await Launcher.LaunchUriAsync(new Uri("LINK"));

Page doesn't destroy/unload itself after OnNavigatedFrom

浪子不回头ぞ 提交于 2019-12-23 01:18:08
问题 I am using a frame to show my current page. The user can switch between two pages. I navigate to the pages via: frame.Navigate(typeof(FirstPage)); and frame.Navigate(typeof(SecondPage)); I thought that every time I switch between the pages the old page will be destoyed/unload all it's content. But looking on the memory usage, it doesn't look like it: (every time I navigate to the SecondPage I run the garbage collector so you can see when a navigation occured) Do I have to change the frame

UWP - Font only applied in Designer

早过忘川 提交于 2019-12-22 18:43:29
问题 I have a class library (Imp.Dash.Cook) referenced by my main UWP app (Imp.Dash). In a page in said class library, I have the following XAML: <TextBlock Text="Banana" FontFamily="/Imp.Dash;component/Fonts/Portmanteau Regular.ttf#Portmanteau"/> <TextBlock Text="Banana" FontFamily="/Imp.Dash.Cook;component/Resources/Portmanteau Regular.ttf#Portmanteau"/> <TextBlock Text="Banana" FontFamily="Resources/Portmanteau Regular.ttf#Portmanteau"/><!-- Works in Designer--> <TextBlock Text="Banana"

How to solve DEP6500 and DEP6701 errors?

无人久伴 提交于 2019-12-22 18:33:40
问题 I have a project called BTLE in its own solution. Loading the project and running it with the debugger on the phone works find. I have a second solution that Loads and compile fine as well. I added the BTLE project (Add/Existing Project) to the second solution, compiled it and tried to run it in the debugger. I can see the application was loaded fine to the phone (I can run it from the phone), but the debugger will not start and I am getting the following error messages: 1>------ Deploy