win-universal-app

HttpClient in Universal Windows app running on Windows 10 IOT Core throws Exception from HRESULT: 0x80072EFD

早过忘川 提交于 2019-12-10 17:40:11
问题 I´m using VS2015 to deploy a universal app to a Raspberry Pi 2 Model B running Windows 10 IOT Core (10.0.10240). Any usage of the HttpClient to call a WebService or retrieve some data like the following HttpClient client = new HttpClient(); var re = await client.GetAsync("http://somehost/api/values/5"); yields an Exception from HRESULT: 0x80072EFD. Capabilities Internet (Client) Internet (Client & Server) Private Networks (Client & Server) are set in the app manifest. Any suggestions? 回答1:

UWP Failed to assign to property error in custom control

不打扰是莪最后的温柔 提交于 2019-12-10 17:39:08
问题 I have a custom control LineChart . Code in xaml.cs: public static readonly DependencyProperty StrokeProperty = DependencyProperty.Register("StrokeProperty", typeof(Brush), typeof(LineChart), new PropertyMetadata(new SolidColorBrush(), new PropertyChangedCallback(OnItemsChanged))); public Brush Stroke { get { return (Brush)GetValue(StrokeProperty); } set { SetValue(StrokeProperty, value); } } In view model class: public Brush Abc { get { return new SolidColorBrush(new Color() {A = 123, B =

How to write serial data to COM ports with Universal Windows Application?

人盡茶涼 提交于 2019-12-10 17:12:58
问题 Typically C# applications use System.IO.Ports like so: SerialPort port = new SerialPort("COM1"); port.Open(); port.WriteLine("test");` But Universal Windows Applications don't support System.IO.Ports so this method cannot be used. Does anyone know how to write serial data through COM ports in a UWA? 回答1: You can do this with the Windows.Devices.SerialCommunication and Windows.Storage.Streams.DataWriter classes: The classes provide functionality to discover such serial device, read and write

How to run a migration in UWP using ef core 1

旧时模样 提交于 2019-12-10 16:29:51
问题 I don't know how I have run the migration in EntityFramework.Core(v7.0.0-rc1-final) using EntityFramework.Commands(also v7.0.0-rc1-final). When I add the migration (Add-Migration) so migration creates. Then, when I enter the Update-Database, so the PM console returns: Update-Database should not be used with Universal Windows apps. Instead, call DbContext. Database. Migrate () at runtime. But the Context.Database does not contain method Migrate(). So this command cannot be specified. It seems

UWP share feature not working in Windows 10 Mobile

吃可爱长大的小学妹 提交于 2019-12-10 16:24:51
问题 I have created a very simple UWP application with a single button. Clicking it should show the built-in share popup to share a PDF file . The fact is that I have it working for Windows 10 (Desktop) but it doesn't work for mobile (the popup doesn't appear on the screen). The PDF file comes as a byte array (because it will come from a remote service). This is the code in MainPage.xaml.cs public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent();

How to change the background color of button on Click Event in Universal Windows Platform Apps?

怎甘沉沦 提交于 2019-12-10 16:08:01
问题 I'm working on a UWP app in windows 10 and I am trying to change the background color of a button in a click event. This is my code: private void button1_1_Click(object sender, RoutedEventArgs e) { if (_Sign) { button_1_1.Content = "Cross"; _Sign = false; } else { // button_1_1.Background = new SolidColorBrush(new Windows.UI.Color ) // indows.UI.Colors clr = new Windows.UI.Colors(new SolidColorBrush red); // SolidColorBrush color = new SolidColorBrush(); // color = new SolidColorBrush. //

Virtualisation not changing properties of new visible items

限于喜欢 提交于 2019-12-10 16:03:38
问题 I am currently using a custom Image object(a wrapper around <Image> object) in a listView. The properties of my custom Image object don't change when a new listview item is visible(realised). For instance if my listview (containing 30 items with different image urls and different text) has 3 items on the first scroll then the 10th item has the same image as the 1st item. The images repeat in the order [1-9][1-9][1-9].... But to my surprise the text is different in all 30 listViewItems. On

“The high OS version validation detected” error during Windows App Certification Kit validation

久未见 提交于 2019-12-10 15:59:35
问题 Getting the following test failure while running Windows App Certification Kit 10.0 : Platform version launch Error Found: The high OS version validation detected the following errors: Cannot launch App The app <apppackagename> failed platform version launch test. Impact if not fixed: The app should not use version information to provide functionality that is specific to the OS. How to fix: Please use recommended methods to check for available functionality in the OS. See the link below for

UWP Tile Background Color Not Working

别等时光非礼了梦想. 提交于 2019-12-10 15:53:56
问题 I set the background color in the app manifest to black but the tile still shows blue in the app list and transparent when pinned to the start screen. The tile color is changed in the IDE (VS) but not when I run it in the phone emulator. There is a similar question and answer: Windows 8 Live Tile Icon Background Color, but it is specifically for Windows 8 and actually says you can set it to anything which is not true as I found out. 回答1: The problem is the value must be a hex value, which is

Page command bar overlaps Splitview Pane

我只是一个虾纸丫 提交于 2019-12-10 15:07:30
问题 In my Page I have bottom command bar, and if that command bar is open and user clicks on SplitView menu than command bar is overlaying the menu. Below is the xaml of splitview page: <SplitView x:Name="NavigationSplitView" DisplayMode="CompactOverlay" IsPaneOpen="True" CompactPaneLength="{StaticResource ShellCompactPaneSize}" OpenPaneLength="300" PaneBackground="{ThemeResource SplitViewBackgroundBrush}" > <!--//App root frame where all content data will be loaded--> <Frame x:Name="rootFrame" /