uwp

Change gridViewItem's background color after first and second click on it

江枫思渺然 提交于 2020-03-06 04:54:12
问题 My point is to change gridViewItem's background color to Blue after first click and to Red after second click on it, then Blue, then Red ... Here is my c# code but it threw an exception 'System.NullReferenceException' on "gvi.Background = new SolidColorBrush(Windows.UI.Colors.Blue);": private void GridViewItem_Click (Object sender, ItemClickEventArgs e) { if(e!=null) { for (int numberOfClick= 1; numberOfClick <100; ++numberOfClick) { GridViewItem gvi = (GridViewItem)NameOf_ItemClick

Ionic Cordova SQLite plugin Windows “Cannot open include file: 'winapifamily.h': No such file or directory ”

狂风中的少年 提交于 2020-03-05 04:21:25
问题 I recently updated my Visual Studio to Visual Studio 2019 (from 2017), and this may be the cause of the problem I am about to describe. Now, when I attempt to build by Ionic project for Windows, I get the error.. c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\corecrt.h(196): fatal error C1083: Cannot open include file: 'winapifamily.h': No such file or directory [D:\dev\myapp\plugins\cordova-sqlite-storage\src\windows\SQLite3-WinRT-sync\SQLite3\SQLite3.UWP.vcxproj] c:

Progressive Web App on a hosted UWP app does not work with HTTPS (Self-Signed)

一个人想着一个人 提交于 2020-03-05 03:03:54
问题 A PWA Angular App hosted on IIS (HTTPS binding with Self-Signed cert) which is being accessed by an UWP app (Hosted UWP: just a UWP shell pointing to the PWA App). When the package.appxmanifest configurations such as StartPage and Content URIs are pointing to the PWA with HTTP scheme it works well (Except of course the Service Worker registration throws a an error since HTTPS is a requirement). However, when I update the URLs to point to HTTPS the UWP shows only a blank white screen with no

“The parameter is incorrect” when setting scan file format to PDF

こ雲淡風輕ζ 提交于 2020-03-03 12:09:59
问题 I am trying to make a UWP app that allows users to quickly set a few settings and then scan a document. One of the settings I want to give the user is to choose between a Tiff or a PDF. When I set the file format to PDF which is in the enum list of File Formats you can set to a scanner configuration I am getting an exception thrown. The exception is "The parameter is incorrect" Other applications are able to scan as a PDF with my type of scanner (Fujitsu fi-6130) but my application will not,

Windows10自适应和交互式toast通知[1]

梦想与她 提交于 2020-03-02 11:41:20
阅读目录: 概述 toast通知的结构 视觉区域(Visual) 行为(Actions) 特定场景下的Toast通知 带多内容的通知 带行为的通知(例子1) 带行为的通知(例子2) 带文本输入框和行为的通知(例子1) 带文本输入框和行为的通知(例子2) 带下拉框输入和行为的通知 提醒通知 前后台激活的例子 <visual>和<audio>的Schema <actions>的Schema 系统行为的附加行为 Windows10的自适应和交互式toast通知是一个新特性。它可以让你: 创建灵活的toast通知,包括内嵌图片及更多的内容,不在局限于之前Windows 8.1和Windows Phone 8.1提供的toast模板。 关于Windows 8.1和Windows Phone 8.1遗留的模板介绍,请看 toast template catalog 。 概述 在Windows10中,有以下几个方面,可以自定义已经存在的toast模板。 移动一个限制的模板模型到一个灵活的自适应模板。 有能力在payload中,增加自定义行为和系统行为。 为主要的toast通知提供三个不同的激活类型。 有能力为特殊场景创建通知,包括闹钟、日历、来电。 上面提到的内容本文都会介绍到。 toast通知的结构 在windows10中,开发者使用xml构造一个toast通知,它包含以下几个关键节点。

Different binding behavior for string[] and List<string>

雨燕双飞 提交于 2020-03-02 00:33:47
问题 I try to understand (without success) why binding behaves differentially when source object is string[] and List<string> . I have two lists, their only difference is ItemsSource - in one case array in second List : XAML code: <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Button Content="Modify items" Click="Button_Click"/> <StackPanel Orientation="Horizontal"> <StackPanel.Resources> <DataTemplate x:Key="ItemTemplate"> <TextBlock Text="{Binding}" FontSize="16"/

UWP youtube player in mediaelement

柔情痞子 提交于 2020-02-28 07:45:13
问题 I am currently developing an UWP youtube player and i am having some big trouble with playing the actual video. I am using this to play a youtube video in a media element: using MyToolkit.Multimedia; var url = await YouTube.GetVideoUriAsync(youtubeid, YouTubeQuality.Quality1080P); var YoutubePlayer = new MediaElement(); YoutubePlayer.Source = url.Uri; It used to work just fine for about a month, but now it just... doesn't. It gets the right video URI (the mp4), i also tried with the

How to check if bluetooth is enabled on a device

▼魔方 西西 提交于 2020-02-28 05:53:47
问题 I want to check if Bluetooth is enabled on a device (so that an app could use it without user interaction). Is there any way to do that? Can I also check Bluetooth and Bluetooth Low Energy separately? 回答1: I accomplished this using the Radio class. To check if Bluetooth is enabled: public static async Task<bool> GetBluetoothIsEnabledAsync() { var radios = await Radio.GetRadiosAsync(); var bluetoothRadio = radios.FirstOrDefault(radio => radio.Kind == RadioKind.Bluetooth); return bluetoothRadio

How can I access files (like a SQLite database) outside of my app's folder in a UWP application?

左心房为你撑大大i 提交于 2020-02-27 09:43:22
问题 I know that UWP applications can use SQLite databases within their own AppData directory, but I would like to access a SQLite database that the user picks from another location (such as their Downloads directory). I could copy the database to my app's directory and open it there, but if it's large then the copy will take a long time, or if the user modifies the database then I have to copy it back etc. and I don't want to manage that complexity. I know that UWP apps can have access to files

How can I access files (like a SQLite database) outside of my app's folder in a UWP application?

帅比萌擦擦* 提交于 2020-02-27 09:42:09
问题 I know that UWP applications can use SQLite databases within their own AppData directory, but I would like to access a SQLite database that the user picks from another location (such as their Downloads directory). I could copy the database to my app's directory and open it there, but if it's large then the copy will take a long time, or if the user modifies the database then I have to copy it back etc. and I don't want to manage that complexity. I know that UWP apps can have access to files