win-universal-app

ArgumentException - Use of undefined keyword value 1 for event TaskScheduled in async

旧城冷巷雨未停 提交于 2019-12-22 01:27:16
问题 Getting System.ArgumentException - Use of undefined keyword value 1 for event TaskScheduled in async apis. There is something wrong when running the first await statement in an Universal app with Visual Studio 2013 Update 3. I am using WP8.1 Universal and silverlight apps after I installed Visual Studio 2013 Update 3. The exceptions happens in Emulator/Device modes. I have spent a couple of days researching this issue without any resolution. I have a sibling article at Windows Dev center

Why does this ScrollViewer's ScrollBars appear twice?

帅比萌擦擦* 提交于 2019-12-22 01:16:47
问题 I edited a ScrollViewer 's template to wait only 0.5 seconds before hiding the scrollbars, and this succeeds in hiding them at that time, but they reappear for another 0.5 seconds. Why? To reproduce, create a page resource for a ScrollViewer's Style with the default Template (find it here on MSDN) and change the 3 occurances of "3" to "0.5". Then use the following XAML: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ScrollViewer Height="500" Width="500" Style="

UWP serial port communication for character write and read (UWP and Arduino)

孤街醉人 提交于 2019-12-22 00:20:52
问题 I am using this code but not working and throwing this exception: Object reference not set to an instance of an object devices[0] giving me null value. private async void ConnectToSerialPort() { string selector = SerialDevice.GetDeviceSelector("COM7"); DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(selector); if (devices.Count > 0) { DeviceInformation deviceInfo = devices[0]; SerialDevice serialDevice = await SerialDevice.FromIdAsync(deviceInfo.Id); Debug.WriteLine

Create custom Shape Control in UWP (Universal Windows Apps), Windows 10

夙愿已清 提交于 2019-12-21 23:04:57
问题 I want to create a custom Shape control, that paints different shapes like Polygon , Ellipse , Rectangle , etc, depending on some custom properties. I was able to create a custom template control ColorShape like this: <Style TargetType="local:CustomShape"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:CustomShape"> <ContentControl x:Name="shapeParent"> </ContentControl> </ControlTemplate> </Setter.Value> </Setter> </Style> And then, override the

Communication between Windows Universal App and Desktop application (Win 10)

时光怂恿深爱的人放手 提交于 2019-12-21 22:42:58
问题 Is there any way to realize communication between a Windows Universal App and a standard Desktop application running at the same computer? I read that UAs don't support IPC. Instead they use those so called background agents. But is it possible to use those background agents not to communicate with a UA but rather a desktop application or is this completely suppressed? The reason is, that I already have a desktop application and I would like to add Cortana support to it, without too much

UWP: How to catch the click of a listview part from another listview in the viewmodel instead of code-behind?

江枫思渺然 提交于 2019-12-21 21:38:24
问题 I have this listview: <Page x:Class="DataBase.ControlsPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DataContext="{Binding CustomersViewModel, Source={StaticResource ViewModelLocator}}"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ListView Name="HeaderList" ItemsSource="{Binding Customers}"> <ListView.ItemTemplate> <DataTemplate> <Grid> <Border Background="Bisque"> <TextBlock Text="

Add System.Web Reference To A Windows 10 Universal App

南楼画角 提交于 2019-12-21 21:34:06
问题 I download a project on Gitgub Basically is a Console Application. But I want to translate this C# Console Application to a Universal Windows App. I want to use HttpUtility.UrlEncode in a windows 10 universal, but I can not find System.Web in .NET (Add Reference) How can I add this assembly to my project? Error: The "HttpUtility" Does not existin the current context. Im using Visual Studio 2015 I try with this question: How Add System.Web Reference To A Windows Form Application But doesnt

phone call in Windows 10 UWP

佐手、 提交于 2019-12-21 20:45:16
问题 Currently, I found Windows.ApplicationModel.Calls API. unable to make a call or launch different options available to make a call from my app. And also I try this Code but still can't implement the Phone call function, any solutions for UWP? Thank You. if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsPhoneContract", 1,0)) { PhoneCallManager.ShowPhoneCallUI("0213132131", "my name"); } 回答1: I've come with a solution that is working on emulator, I cannot test it on

How to make a vertical progress bar?

淺唱寂寞╮ 提交于 2019-12-21 20:22:06
问题 I'm trying to create a ProgressBar that is vertical rather than horizontal, I've tried changing the angle of the ProgressBar so it's vertical rather than horizontal, heres my code: <ProgressBar Maximum="100" Value="20" Height="30" Width="5" > <ProgressBar.Background> <SolidColorBrush Color="White" Opacity="0.15999999642372131"/> </ProgressBar.Background> <ProgressBar.RenderTransform> <RotateTransform Angle="0" CenterX="0" CenterY="0"/> </ProgressBar.RenderTransform> </ProgressBar> However,

How to convert a Windows.UI.Color into a string color name in a Windows Universal app

ε祈祈猫儿з 提交于 2019-12-21 19:19:05
问题 I'm trying to convert a Windows.UI.Color into a simple string color name in my Windows 8.1 Universal app. I already have the ARGB values from the Color (even the hex code), and I just want its associated known name (for example, from #7AFF7A7A to "salmon"). Since System.Drawing is not available in WinRT, I cannot use ColorConverter or ColorTranslator. I've tried converting the Windows.UI.Color object into a SolidColorBrush or even a Brush, but none of them provide the name conversion