uwp

UWP app cannot find/connect to USB device

。_饼干妹妹 提交于 2019-12-18 06:13:03
问题 I am trying to make a UWP app which connects to a USB device and then executes a series of commands, like retrieving data from the internal sensor (think of an accelerometer). I started of with following these guidelines: https://msdn.microsoft.com/en-us/library/windows/hardware/dn303343(v=vs.85).aspx So, I also tried making a blank app, and adjusted the manifest accordingly: <Capabilities> <DeviceCapability Name="usb"> <Device Id="vidpid:1CBE 0003"> <Function Type="classId:ff 00 00" /> <

How to get StackTrace without Exception in Windows Universal 10 App

你说的曾经没有我的故事 提交于 2019-12-18 05:59:31
问题 I know it was possible to use: System.Diagnostics.StackTrace t = new System.Diagnostics.StackTrace(); but that seems to not work anymore, as it needs an Exception-Object. 回答1: Try Environment.StackTrace. Just remember to be careful with what your logic afterwards is as stacks can change in unpredictable ways. Some discussion here: https://github.com/dotnet/corefx/issues/1420 回答2: Check out this discussion on .NET Core's github: Where have StackTrace and StackFrame gone?. This class isn't

How to easily allow users to update Styles used be elements in XAML (UWP)

青春壹個敷衍的年華 提交于 2019-12-18 05:23:17
问题 This is for a Windows 10 UWP. I need to allow users to update values on Styles that are associated with elements used throughout the application (i.e allow users to change the font size of various textblocks, background color stackpanels etc.) . I currently have all my Styles in a separately file. My App.xaml is as below: <Application x:Class="MyTestApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application

Communication between UWP and Non UWP app

回眸只為那壹抹淺笑 提交于 2019-12-18 04:08:46
问题 Is it possible to have communication between uwp and non uwp apps. My non-uwp is a background task which provides a service. I want to call that non-uwp service in uwp app. How to make that call? Is AppServiceConnection class available in non-uwp app? 回答1: Yes, non-UWP apps can use AppServices to communicate with UWP apps. There is a sample here: https://github.com/Microsoft/DesktopBridgeToUWP-Samples/blob/master/Samples/AppServiceBridgeSample_C%2B%2B/cs/Win32Process_CPP/Win32Process_CPP.cpp

Display local images in UWP WebView control

萝らか妹 提交于 2019-12-18 03:43:12
问题 I need to write the code which will load some HTML (received from external source by other means) into WebView and display images referenced in this HTML. These images will be stored locally somewhere in Windows.Storage.ApplicationData.Current.LocalFolder. Neither of suggestions at use local image to display in webview for windows phone 8.1 or Use local images in Webbrowser control work for me. If I load such HTML with web.NavigateToString(html): <html><head></head><body>A <img src="file:///c

How to create a working trusted and or self-signed certificate for a Windows 10 UWP application via Visual Studio 2019, 2017 and 2015

蓝咒 提交于 2019-12-17 22:35:36
问题 Per this documentation: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/makecert The following command describes creating a windows cer-file (i.e. a certificate from a trusted provider.) The issue with this is that when building an application in visual studio 2017 it only allows, via the package.windows10.appxmanifest, a pfx file. when updating the this command line reference it doesn't produce a pvk file so one needs to add MakeCert -r -pe -ss PrivateCertStore -n "CN

How to clear TimeZoneInfo cache in WinRT?

泄露秘密 提交于 2019-12-17 21:20:27
问题 In .NET some values used by TimeZoneInfo are cached, such as the current time zone in use by TimeZoneInfo.Local , DateTime.ToLocalTime , etc. In traditional .NET framework apps, this cache can be cleared by calling TimeZoneInfo.ClearCachedData() , as explained in the docs. However, in WinRT applications, such as Windows Store apps, and Windows Universal Apps, the ClearCachedData API is not available. How do you clear the time zone cache in a WinRT environment? 回答1: There's an undocumented way

How to display a list of available meeting rooms at present using Microsoft Graph API

本秂侑毒 提交于 2019-12-17 20:42:46
问题 I have been trying to play around with the Microsoft Graph API. I have a situation here. I have assigned some meeting rooms with an email ID and want to know the availability of all. If the rooms are available currently , I should get the name of the meeting room and if possible , the duration for which the room is available. I want to know how to query multiple rooms and return the data. A bit confused about the following APIs, would these help ? https://developer.microsoft.com/en-us/graph

Timer in UWP App which isn't linked to the UI

ε祈祈猫儿з 提交于 2019-12-17 20:34:40
问题 I'm working on an UWP MVVM project and would like to implement an automatic logout system if the user interaction stops for a specific time. Until now I'm using a DispatcherTimer to count backwards from 200 every second. TimerLeave = 200; var _dispatcherTimer = new DispatcherTimer(); _dispatcherTimer.Tick += dispatcherTimer_Tick; _dispatcherTimer.Interval = new TimeSpan(0, 0, 1); _dispatcherTimer.Start(); But because the DispatcherTimer is linked with the UI and I'm building a MVVM App, I'm

How to create a speech bubble in UWP?

杀马特。学长 韩版系。学妹 提交于 2019-12-17 19:44:52
问题 I'm creating a chat application and would like to create the typical speech bubble that contains each message. I created a Path object in Blend (in XAML) like this: The problem is that the path is has designed to have a specified width and height and I would like it to wrap around the text without stretching, so it won't look deformed, like a border does. How can I make it behave like I want? 回答1: You may use Polygon in combination with StackPanel : <StackPanel Orientation="Horizontal"