uwp

UWP Webview get links from webpage into an array

旧街凉风 提交于 2019-12-05 21:31:47
I can only find old outdated answers for before UWP Win 10. I know how to do it the old ways, but it is giving me problems. What I have so far is below, note the problem seem to lie in the VB where it isn't doing the element by tag name command like I've been told it should. Change that to inner HTML though, and it will populate the html variable with the full page. So I just can't get the links themselves it seems. Any help is appreciated! Thanks! XAML <Page x:Class="webviewMessingAround.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas

WebRTC for UWP, new RTCPeerConnection() doesn't complete execution

跟風遠走 提交于 2019-12-05 21:07:49
I’m trying to create a Universal Windows Platform application that uses WebRTC, but my code never executes past the first new RTCPeerConnection. I have been looking at the open source project WebRTC for UWP ( blog post with links to git repos) and managed to build and run the ChatterBox VoIP client example. Since I am new to both UWP programming and WebRTC (and .NET, C# and Windows programming in general) the examples I have been looking at in the repos mentioned above have been much too complex for me to follow. To start with something simpler, I want to recreate the WebRTC.org minimalistic

How to add .NET dll reference to UWP project?

爷,独闯天下 提交于 2019-12-05 20:45:28
问题 I have several .NET dll projects for .NETv4.x. I changed version to 4.6.1 and rebuilded without problems. When I try to add referene to them from my UWP project I get error: The project targets '.NETCore' while the file reference targets '.NETFramework'. This is not a supported scenario. I can't also reference .NET projects from 'Add reference...'->'Projects': Unable to add a reference to project But in project settings I can't see anything to change it's target to '.NETCore'. Is it possible

How to troubleshoot remote UWP AppService problems?

隐身守侯 提交于 2019-12-05 20:25:21
I'm playing around with remote UWP AppServices in C# and I run into a very early roadblock: Getting a RemoteSystem instance. I followed the tutorial on https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/communicate-with-a-remote-app-service with my own code and I tried out the RemoteSystems sample as part of https://github.com/Microsoft/Windows-universal-samples Unfortunately, the result is always the same. First I request access to remote systems: RemoteSystemAccessStatus status = await RemoteSystem.RequestAccessAsync(); This is successful: status has the value

Unselect GridView.Item on click if already selected

折月煮酒 提交于 2019-12-05 20:23:39
I know this seems rather simple, and that's what I thought too, but it actually isn't. I have a GridView, with SelectionMode="Single", and I want to simply unselect a selected item by clicking on it. Problem is, SelectionChanged doesn't fire when you select an item that is already selected. I've tried having an int equal to the GridView's SelectedIndex on each SelectionChanged, and then check on Grid_Tapped to see if PreviousSelectedIndex == CurrentlySelectedIndex, but the SelectionChanged event fires nanoseconds before the Grid_Tapped, so it doesn't work. Any ideas? Yes it is a bit weird

Avoid .NET Native bugs

浪子不回头ぞ 提交于 2019-12-05 20:00:24
I spent the last year (part time) to migrate my existing (and successful) Windows 8.1 app to Windows 10 UWP. Now, just before releasing it to the store, I tested the app in the "Release" build mode (which triggers .NET Native). Everything seemed to work until I - by chance - noted a subtle but serious (because data-compromising) bug. It took me two days to reduce it to these three lines of code: var array1 = new int[1, 1]; var array2 = (int[,])array1.Clone(); array2[0, 0] = 666; if (array1[0, 0] != array2[0, 0]) { ApplicationView.GetForCurrentView().Title = "OK."; } else { ApplicationView

Appbar Button label positions automatically UWP

血红的双手。 提交于 2019-12-05 19:41:12
I am working on a UWP app. I am using Appbar buttons to show quick Icon buttons for actions. The issue is, The labels automatically get placed horizontally to the icon while some are still placed below the icon. Is there any way they the label position can be fixed? Below is the picture for clearer understanding of the issue: But ideally I want them to look like below Is there any way of making sure they(the icons and their respective labels) remain vertically aligned. Below is my code: <AppBarButton Label="Share" Grid.Column="2" HorizontalAlignment="Center"> <AppBarButton.Icon> <PathIcon

UWP Button Changes Colors when Mouse hovers over

。_饼干妹妹 提交于 2019-12-05 19:19:05
问题 I am trying to create a UWP button which will change background color when the mouse pointer hovers over it. The trouble I am having is that by default, it seems to already do this, but not to the color I want. When I hover over my button, which is red, it turns to the default grey and then back when I mouse out. I wrote code in C# to attempt to make it turn blue when I hover over it private void button_PointerEntered_1(object sender, PointerRoutedEventArgs e) { button.Background = new

How to restart an app in UWP?

故事扮演 提交于 2019-12-05 18:57:30
Currently in my UWP application, I provide a way to change the app theme. But in order for the change to be effective, the user has to manually close the app and restart it. I'm looking for a way to do it automatically, ie, restart the app programmatically. Is it even possible? thank you. According to a recent blog post , there is a new API for this "from Build 16226 onwards, along with the corresponding SDK." The new static RequestRestartAsync(String) method and overloads on CoreApplication provide the previously unavailable app restart magic, including the ability to pass arguments to the

SerialDevice.FromIdAsync() yields a null serial port

泪湿孤枕 提交于 2019-12-05 18:42:57
I have something strange happening with my code when trying to connect to a serial port. When using Serial Sample , everything works just fine and it connects on the first try. However, with my code the serial port returns a null. I have found a workaround by nested the call to write the serial port in a do loop until the serial port is no longer null and it works. It takes, on average, 500 loops to connect and it has always connected. I know it's dangerous because there is the infinite loop if it's always null, so I tried switching the do loop to a for loop. With a for loop, it always returns