windows-10-universal

Win 10 app: remove toast notification

南笙酒味 提交于 2019-12-08 04:52:31
问题 I show toast notification that it then appears on notification center. I want then to programatically remove that notification from notification center. How can I do this? The app may be closed and restarted between time the notification is shown and when I need to remove it. 回答1: You can programmatically remove notifications from the action center by using one of the various methods of the ToastNotificationHistory class. For example: ToastNotificationManager.History.Remove("toast-tag");

Why value does not fall within the expected range when setting Value Changed for Gatt Characteristic

爱⌒轻易说出口 提交于 2019-12-08 04:41:16
问题 I would like to keep on reading characteristic/set value changed event handlers for characteristics from my BLE 4.0 device, by using the ValueChanged callback in Universal Windows Platform C# in Visual Studio 2017. I followed some tutorial from these sites: Damian Blog's Windows Universal with BLE, Bluetooth Gatt's Git Hub, Bluetooth Generic Attribute Profile - Heart Rate Service and Dr. Jukka's mobile Blog on BLE. All of them are using ValueChanged and I have tried to follow what they did.

How to invoke javascript in WebView Windows 10 UWP?

╄→гoц情女王★ 提交于 2019-12-08 04:32:42
问题 I am trying to load a javascript in WebView to do some calculations and get the output in a string. I tried to use following code string htmlFragment = "<html><head><script type='text/javascript'>" + "function doubleIt(incoming){ " + " var intIncoming = parseInt(incoming, 10);" + " var doubled = intIncoming * 2;" + " document.body.style.fontSize= doubled.toString() + 'px';" + " return doubled.toString());" + "};" + "</script></head><body>" + "<div id = 'myDiv'>I AM CONTENT</div></body></html>

“GenerateAppxPackageRecipe” task was not given a value for the required parameter “AppxManifestXml”

戏子无情 提交于 2019-12-08 02:56:01
问题 Just updated to VS2015 Update 3 RC and now can't build UWP solution in Release configuration because of the following error: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2194,5): error MSB4044: The "GenerateAppxPackageRecipe" task was not given a value for the required parameter "AppxManifestXml" . It was fine a few minutes ago with VS2015 Update 2 and no any code changes since then. Anyone experience something like this after update

How to set the window's size in a Universal app?

不问归期 提交于 2019-12-08 02:45:24
问题 I use C# and XAML, and my main page begins like this : <Page x:Class="MyApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MyApp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="754" Width="1018" MaxHeight="754" MaxWidth="1018" MinHeight="754" MinWidth="1018" mc:Ignorable="d"> <Grid> (...) </Grid> But

Can I set the uwp app store display name to be different from the installed app display name?

风格不统一 提交于 2019-12-08 02:43:16
问题 I would like to have a more descriptive name (for discoverability) in the Microsoft app store, but use a shorter name for the app when it is installed. I have reserved both names. I am thinking I set the App Manifest to have the short name in the Application -> Display name, and the more descriptive, store name in Packaging -> Package display name, but I don't understand the way these two names are used so I'm just guessing. Before I try this with an actual submission, I'm wondering if

WebRequest does not contain a definition for 'GetResponse' for Windows 10 Universal App

家住魔仙堡 提交于 2019-12-08 01:51:00
问题 I download a Console Application on GitHub and works fine. But I want to translate this C# Console Application to a Universal Windows 10 Application. The error on Visual Studio : Web Request does not contain a definition for... This is the code: private AccessTokenInfo HttpPost(string accessUri, string requestDetails) { //Prepare OAuth request WebRequest webRequest = WebRequest.Create(accessUri); webRequest.ContentType = "application/x-www-form-urlencoded"; webRequest.Method = "POST"; byte[]

Internal compiler error when UseDotNetNativeToolchain is true

妖精的绣舞 提交于 2019-12-07 23:29:31
问题 I have a UWP app that compiles successfully if I have UseDotNetNativeToolchain off. But when I turn it on, it gives me the cryptic error: Internal compiler error: Object reference not set to an instance of an object. UWPApp C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets 887 Build This is all it gives me. What could be causing this? How can I drill down on this. Using VS2015 Here is the full build output in case that helps: https://gist.github.com/shannah

Smart Card Reader Plugin (Card Inserted) Event

岁酱吖の 提交于 2019-12-07 21:00:29
问题 Background: I'm creating a Windows 10 Universal App which reads some data from smart card (inserted into smart card reader) and it is working properly, but in all cases, the user should trigger the process to read data from card. Question: How can I handle the 'Card Inserted Event' in UWP, so I can read data from card each time after it is inserted? 回答1: I am not familiar with UWP but i found this example. It creates a smartcard reader instance: private SmartCardReader reader = provisioning

Install developed Application without developer mode

半腔热情 提交于 2019-12-07 18:19:32
问题 I developed an Windows 10 UWP Application. This application should be used in the company, so I build it via the built in tool of Visual Studio 2015. To do that i followed this guide : Packaging Universal Windows apps for Windows 10 This worked fine, and i don't have a problem to install the Add-AppDevPackage.ps1 via Windows Powershell when i have the "developer mode" enabled. Now the problem: I don't want that my employees have to activate the developer mode. They should activate the