windows-10-universal

Getting IPGlobalProperties with VB.net on a UWP application

你。 提交于 2019-12-02 13:22:11
I am writing a very simple Universal Windows application with VB in Visual Studio 2017. The application should gave basic network information to the user, so I wanted to collect the data using IPGlobalProperties and print – as a first example – the DomainName in a TextBlock called textDomain Dim NetworkProperties As NetworkInformation.IPGlobalProperties NetworkProperties = NetworkInformation.IPGlobalProperties.GetIPGlobalProperties textDomain.Text = NetworkProperties.DomainName While the properties are correctly assigned int the first two lines of code, the third line result in the error

Navigate to a Page of another Class Library

折月煮酒 提交于 2019-12-02 12:23:07
I need to create several versions of a core project. Few things can change between core project and its extensions, some functionalities and, above all, design (Fonts, colors, etc). For that, I've created a Class Library . I made a question about that few days ago and I guessed creating the Class Library was the proper way to do it. Here you have a link to the post. Now that I have all the project in the library, I'm creating those extensions and I would like to Navigate to Pages of the Class Library but from the extensions and I get this exception: Exception thrown: 'System

UWP: How to get the TaskBar Height

◇◆丶佛笑我妖孽 提交于 2019-12-02 10:56:36
I am making an UWP application.My requirement is to get the size of the TaskBar programatically (This application will run on Tablets of different resolution). After following many answers on stackoverflow(which were actually more relevant to hiding/showing the taskbar), I came through this: How do I get the taskbar's position and size? But this can't be done in case of UWP apps.Is there any other way to get the Height of the TaskBar. Please Note : The TaskBar is always visible in case of my application.I don't intend to hide it Thanks!! Well!! So after a lot of searching on internet, seeing

Cannot get file sent from UWP app using Windows.Web.Http to WebAPI web service controller

左心房为你撑大大i 提交于 2019-12-02 09:10:17
I have the following code on my Windows 10 UWP app to send a file to a WebAPI web service. public async void Upload_FileAsync(string WebServiceURL, string FilePathToUpload) { //prepare HttpStreamContent IStorageFile storageFile = await StorageFile.GetFileFromPathAsync(FilePathToUpload); IRandomAccessStream stream=await storageFile.OpenAsync(FileAccessMode.Read); Windows.Web.Http.HttpStreamContent streamContent = new Windows.Web.Http.HttpStreamContent(stream); //send request var myFilter = new Windows.Web.Http.Filters.HttpBaseProtocolFilter(); myFilter.AllowUI = false; var client = new Windows

How to make Windows 10 pivot/tab headers full width of screen

时光毁灭记忆、已成空白 提交于 2019-12-02 08:55:24
How can I make the pivot/tabs header have each individual tab be the same width and stretch the full width of the pivot header and not extend off the screen (particularly for mobile)? I have yet to find an example of how to do this. Here's what I'm trying to achieve: How can I make the pivot/tabs header have each individual tab be the same width and stretch the full width This might not be able to implemented by just setting the style of pivot. But this can be easily implemented by ViewTreeHelper class. We can try to calculate the width of each header item by actualwidth of the pivot header

UWP Manifest issue / restricted capability / inputForegroundObservation

两盒软妹~` 提交于 2019-12-02 08:47:29
I'm trying to follow this StackOverflow article, referring to this similar article on StackOverflow, and this from the UWP Windows Dev Center. In my manifest XML, the <Package> tag was updated to include xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" and also IgnorableNamespaces="uap mp wincap rescap" . My <Capabilities> section looks like this: <Capabilities> <Capability Name="internetClient" /> <rescap:Capability Name="inputForegroundObservation" /> </Capabilities> And <rescap:Capability is underlined with error: "The element

How to launch a Windows Universal App from winform

馋奶兔 提交于 2019-12-02 07:51:02
问题 I am trying to run a Windows Universal App from my winform using the following code but unfortunately it opens the documents folder. I am new in UWP app development. Is it the correct way to launch a UWP app? Process p = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "explorer.exe"; startInfo.Arguments = @"shell:appsFolder\Microsoft.SDKSamples.CameraAdvancedCapture.CS_8wekyb3d8bbwe!App"; p.StartInfo = startInfo; p.Start(); 回答1: You really have two

How to launch a Windows Universal App from winform

Deadly 提交于 2019-12-02 07:26:35
I am trying to run a Windows Universal App from my winform using the following code but unfortunately it opens the documents folder. I am new in UWP app development. Is it the correct way to launch a UWP app? Process p = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "explorer.exe"; startInfo.Arguments = @"shell:appsFolder\Microsoft.SDKSamples.CameraAdvancedCapture.CS_8wekyb3d8bbwe!App"; p.StartInfo = startInfo; p.Start(); Rob Caplan - MSFT You really have two questions here: How do you launch a protocol from a WinForms app How to properly launch a UWP

minimize the Height of the BottomAppBar in a universal App

帅比萌擦擦* 提交于 2019-12-02 04:38:41
I want to minimize the Height of the BottomAppBar this is my xaml code: <Page.BottomAppBar > <CommandBar Background="#393185" Foreground="White" VerticalAlignment="Stretch" Style="{Binding Source={StaticResource Ellipsis}}" Height="40" MaxHeight="40" > <CommandBar.CommandBarOverflowPresenterStyle> <Style TargetType="CommandBarOverflowPresenter"> <Setter Property="Background" Value="#00a0e3" ></Setter> <Setter Property="Margin" Value="0"></Setter> <Setter Property="Padding" Value="0"></Setter> <Setter Property="BorderBrush" Value="Transparent"/> </Style> </CommandBar

How to display a clock with the current time in a Windows Core IoT app?

一笑奈何 提交于 2019-12-02 03:18:35
I am trying to create an Windows 10 IoT app running headless on a Raspberry Pi 2. Everything is set up correctly and I am able to debug my from Visual Studio using the Raspberry Pi as the remote machine for debugging. Now I want to add a clock on the app page but I can't figure out how to keep the displayed time updated. In plain old C# I would use a BackgroudWorker or something similar to keep the displayed time current, but that type is not available in UWP. I have been looking into "Create and register a background task" on MSDN but that seems to be way to complex, just to be able to keep