win-universal-app

Windows10 script pin app to start menu

怎甘沉沦 提交于 2019-12-07 23:13:59
问题 I have a Universal App that I'm sideloading in Windows10. I would like to create a script (Powershell, VBS, batch, etc) to pin it to the Start Menu. I have found many examples of how to write a script that pins a desktop application (like this one: https://gallery.technet.microsoft.com/scriptcenter/Script-to-pin-items-to-51be533c ). I've tried using the script to pin the actual App .exe file located in C:\Program Files\WindowsApps... but that doesn't work. When I try and pin that way, I run

Check platform on Windows 10 Universal App

元气小坏坏 提交于 2019-12-07 22:58:25
问题 How can I check which platform (Windows / Windows Phone) my app is running? 回答1: VersionInfo | versionInfo property should helps to check the platform information. var str = Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily; if (str == "Windows.Desktop") { //... } else if (str == "Windows.Mobile") { //... } 回答2: Yes, you can use the compiler directives #if WINDOWS_PHONE //some code #endif #if WINDOWS //some code #endif 来源: https://stackoverflow.com/questions/32404755/check

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

Register a Background Task without running the app

早过忘川 提交于 2019-12-07 19:18:27
问题 tl;dr : How do I register a Background Task without having to run the app? Long version : I want to register a Background Task to run every time the user logs in using SystemTriggerType.UserPresent . I've found information about registering the Task, but that is code that has to be executed. That would be fine if the Task only has to be executed after the app runs. But how do I register the Task without running the app? A Background Task can be registered by var builder = new

Windows 10 UAP determine if device is IoT (e.g. Raspberry Pi 2)

ぃ、小莉子 提交于 2019-12-07 19:09:28
问题 I was wondering how to determine if the device belongs to the IoT-family, in my case a Raspberry Pi 2, but I don't need to know if it is specifically a Raspberry, just an IoT device. I tried the following code: //if(ApiInformation.IsApiContractPresent("DevicesLowLevelContract ", 1)) if (ApiInformation.IsTypePresent("Windows.Devices.Gpio")) { this.InitializeSensor(); return; } Both wont be true on my notebook, but wont be true as well on my Rasbperry Pi. Has someone an idea or knows how to do

Doing localization in visualstatemanager by changing x:uid?

社会主义新天地 提交于 2019-12-07 18:50:28
问题 I am adding localization to my UWP app by adding x:uid tags to all of my elements and using the multilingual toolkit. However I've run into an issue where in one case I change the text itself in the narrow view using the visualstatemanager. How can I do this in a localized app? My first thought would be to change the uid of the element to the new match the new text, I'm not sure it's possible. Here is an example of what I'd like to do, but doesn't work: <textblock x:Name="DescriptionTextBox"

How can I disable tilt animation on GridView/ListView in Win10 Universal app?

◇◆丶佛笑我妖孽 提交于 2019-12-07 18:10:01
问题 It used to be I could cancel the tilt effect on GridView/ListView by editing the item container style and removing the storyboard animations. However, when I edit the templates now on Win10 Universal apps, I am not seeing any of the storyboards. Where can I cancel the animation at? Here's the style that's generated for me (and when used, does not disable animation): <Style x:Key="ListViewItemStyle1" TargetType="ListViewItem"> <Setter Property="FontFamily" Value="{ThemeResource

UWP: Can't create a new VPN profile

血红的双手。 提交于 2019-12-07 17:43:55
问题 I'm trying to create a new VPN profile in a universal windows app. I am using this api. There are two documented ways to do that. AddProfileFromXmlAsync and AddProfileFromObjectAsync. Unfortunately for me none of them work correctly. When I'm using AddProfileFromXmlAsync I get all the time error AccessDenied. I saw on this thread that somehow it could be related to bad xml syntax but I get the same error also when I am using the exact xml in the Microsoft example. AddProfileFromObjectAsync

ContentDialog not aligning to center on UWP

回眸只為那壹抹淺笑 提交于 2019-12-07 17:20:45
问题 From what I know, ContentDialog 's default behavior should be to have it centered on PC and aligned to top on mobile, but in my case I have it aligned to top even on PC and I don't understand what's going on. I'm creating it using code-behind, and this is a snippet of the code that I'm using: // Creates the password box var passwordBox = new PasswordBox {IsPasswordRevealButtonEnabled = true, Margin = new Thickness(5)}; // Creates the StackPanel with the content var contentPanel = new

Template 10:Get the splash screen like the course in MVA

ε祈祈猫儿з 提交于 2019-12-07 15:52:28
I just completed the course on template 10 in mva. Now I am working on this app and would like it to have the splash screen like this(of course the logo can be changed). Where should I get started to code(any tutorial)? Or if there's a sample code available. Screenshots: I think it uses an extended splash screen. The extended splash screen in UWP is the same as it in a Windows 8.1 app. You can start with How to extend the splash screen (XAML) , there is a 8.1 sample in this document, and you can also refer to the official UWP Splash screen sample . And from your picture, there is a circular