win-universal-app

Adding settings class to a UWP app

被刻印的时光 ゝ 提交于 2019-12-02 19:54:12
I'm developing a Universal Windows Platform app but there is no Settings template in Visual Studio. How can I implement an easy, strongly typed and observable class that stores my settings in LocalSettings or RoamingSettings? Create a new class inheriting from ObservableSettings. Call to the base class constructor indicating if you want to store the settings in LocalSettings or in RoamingSettings . Add all your properties calling the base class members Set and Get in the getter and in the setter. No need to pass the name of the property or use nameof() operator! Optionally you can set a

MVVM light can't work in Windows 10 Universal app

我与影子孤独终老i 提交于 2019-12-02 18:35:57
I tried to use MVVMLight in our Windows 10 Universal app, but it seems like that it totally can't work. I've seen this blog Nuget downloaded and added a reference to the MVVM Light assemblies Nuget also added the ViewModelLocator in the Application.Resources. Can't see the Locator in Application.Resources You need to create the ViewModelLocator manually, please follow these steps: Create a new Windows 10 Universal app, for example: MVVMLightUWPApp1 Add reference to MVVMLight using NuGet Package Manager Add a folder for your UWP app, for example: ViewModel Under the ViewModel folder, add two

Hello World for Pinvoke and Native Calls

蹲街弑〆低调 提交于 2019-12-02 17:54:39
问题 I am trying to do a very basic hello world for Pinvoke and native calls. I create a single solution with 2 projects (one for the dll and one for the universal windows app) So I end up with a project heirachy like this There is one method in my dll (file NativeCalls.cpp): #include "pch.h" #include "NativeCalls.h" #include <stdio.h> MYAPI void print_line(const char* str) { printf("%s\n", str); } On the C# side of things I have my NativeCalls.cs file using System; using System.Collections

Navigate to a Page of another Class Library

做~自己de王妃 提交于 2019-12-02 17:14:49
问题 I need to create several versions of a core project. Few things can change between core project and its extensions, some functionalities and, above all, design (Fonts, colors, etc). For that, I've created a Class Library . I made a question about that few days ago and I guessed creating the Class Library was the proper way to do it. Here you have a link to the post. Now that I have all the project in the library, I'm creating those extensions and I would like to Navigate to Pages of the Class

How to check internet connectivity type in Universal Windows Platform

南笙酒味 提交于 2019-12-02 16:57:20
I would like to check internet connectivity type in Windows Universal Application. Not Connected Connected via WLAN(WiFi) Connected via WWAN(Cellular Data) Connected to a metered network in order to provide an option for downloading large size content. And also sense the significant network availability changes. Currently, I'm only able to check whether internet connected or not using GetIsNetworkAvailable method of NetworkInterface class. NetworkInterface.GetIsNetworkAvailable(); 1. Check Internet Connection Availability To check whether internet connected or not use GetIsNetworkAvailable

UWP limitations in desktop apps

雨燕双飞 提交于 2019-12-02 16:09:48
I know that the new UWP app model has some limitations when comparing to "traditional" Win32 apps. Let's take Visual Studio Code as an example of a desktop app. What features of Visual Studio Code were missing or had to be different from user perspective, if it was an UWP app? EDIT: I've done exams for microsoft certification "Essentials of Developing Windows Store Apps Using C#" and Exam 70-355: Universal Windows Platform – App Data, Services, and Coding Patterns. So I know something about win rt api. Please don't bother with answers like "uwp app runs in sandbox". They are useless, because

How to make UWP app to suspend and resume state

点点圈 提交于 2019-12-02 16:02:51
问题 I am able to suspend and resume the UWP application using visual studio Life cycle events. But when I tried with User's machine I am unable to get the suspend and resume state of the application. I tried using resource monitor to suspend and resume the process , but it is not hitting "Onsuspend" event, while on resuming it is not hitting "OnResume" event. Is there any other way to hit the OnResume event in the application? 回答1: When running outside of the debugger on a desktop machine you can

minimize the Height of the BottomAppBar in a universal App

你离开我真会死。 提交于 2019-12-02 14:10:03
问题 I want to minimize the Height of the BottomAppBar this is my xaml code: <Page.BottomAppBar > <CommandBar Background="#393185" Foreground="White" VerticalAlignment="Stretch" Style="{Binding Source={StaticResource Ellipsis}}" Height="40" MaxHeight="40" > <CommandBar.CommandBarOverflowPresenterStyle> <Style TargetType="CommandBarOverflowPresenter"> <Setter Property="Background" Value="#00a0e3" ></Setter> <Setter Property="Margin" Value="0"></Setter> <Setter Property="Padding" Value="0"></Setter>

UWP [Universal windows platform] RSA AsymmetricKeyAlgorithmProvider import public key

断了今生、忘了曾经 提交于 2019-12-02 14:05:13
问题 When I am trying to use Windows.Security.Cryptography.Core in UWP, I always get an error on importing the public key from AsymmetricKeyAlgorithmProvider . I tried every combination without success. I always checked the input string to be in UTF8 mode. try { var bytes = Encoding.UTF8.GetBytes(publicKeyString); publicKeyString = Encoding.UTF8.GetString(bytes); Debug.WriteLine(publicKeyString); IBuffer keyBuffer = CryptographicBuffer.DecodeFromBase64String(publicKeyString); byte[] bytes =

Windows 10 Universal Javascript app SQLite in Windows Mobile 10

无人久伴 提交于 2019-12-02 13:16:43
问题 I currently have a somewhat working Windows 10 Universal app that uses the SQLite wrapper available here. The problem however is, when I deploy the app to a Windows 10 Mobile emulator in visual studio, it ceases to work, and instead gives me the following error: Exception is about to be caught by JavaScript library code at line 401, column 5 in /js/SQLite3.js 0x8007007e - JavaScript runtime error: The specified module could not be found. As this works fine when deploying to local machine, is