uwp

Is there a way to UnitTest a Class Library (Universal Windows) without testing a whole application?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 03:52:16
问题 I need to UnitTest a Class Library (Universal Windows) , but from the "Add New Project" windows, I just see this: This project runs all tests with the App Container, it always opens an App. Since I don't need all that overhead, I would like to know if is there a way to Unit Test just the UWP library. 回答1: The quick answer is that if you need to test UI related classes you'll need to use this kind of "unit test". However if you have logic which you want to test - extract it to a portable

Could not find a suitable SDK to target

﹥>﹥吖頭↗ 提交于 2019-12-10 01:28:53
问题 I try to create a project for UWP but I get this error: 回答1: I install windows development kit and it worked. Thanks 回答2: Part of the problem can be solved by choosing an older sdk. Choose the second newest from here: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive 回答3: Installing the latest SDK didn't help me either. The installer wouldn't complete, kept getting to 97% and then rolling back. I had a whole load of MDMERGE errors like: MDMERGE : error MDM2009: Duplicate

How to add icons to SecondaryCommands in Command Bar

╄→гoц情女王★ 提交于 2019-12-10 00:05:08
问题 I am trying to build a CommandBar that looks like this: Desired CommandBar with SecondaryCommands that have icons But I can't find a way to edit the default style of CommandOverflowPresenter in order to show SecondaryCommands like they are shown in Mail Windows 10 universal app, with icons on the left and text labels on the right. The CommandOverflowPresenter doesn't have a Content property to build a control template around it and bind content elements to AppBarButton Icon and Label

C# user interface updates are not deterministic

落花浮王杯 提交于 2019-12-09 23:37:01
问题 UWP application, C#, Visual Studio 2017, Windows 10 Creators Update (10.0; Build 15063). Let's call TextBlock1 as T1, TextBlock2 as T2... Desired output is: T1 shows "Work started." T2 shows "Step 1" T2 shows "Step 2" T2 shows "" T1 shows "Work Finished." private async void Btn_Click(object sender, RoutedEventArgs e) { TextBlock1.Text = "Work started."; await DoWork(); TextBlock1.Text = "Work done."; } private async Task DoWork() { TextBlock2.Text = "Step 1"; await Task.Delay(1); //Pretend to

Windows UWP application lifecycle: how to prevent reload in JS/HTML/CSS app

情到浓时终转凉″ 提交于 2019-12-09 23:22:33
问题 I have a simple UWP application built in HTML/JS/CSS. It is essentially a website, that loads some data into webview and so on, nothing out of ordinary. What I struggle with is the application lifecycle and its "resuming" state, where is the application has been already running, and user opens the application again, then the whole application is re-rendered, all the html+js gets to run again which is causing basically a reload (just like via F5). How do I prevent it? Here is the very basic

Xamarin Forms ListView Images Sometimes Displays, Sometimes Doesn't (UWP)

梦想的初衷 提交于 2019-12-09 23:18:03
问题 I have a ListView in which I'm displaying the same image ( chevron_right.png ) in each of the rows. On load, none of the images show. However, when I navigate away from that page via Navigation.PushAsync() and then return back to the original page via Navigation.PopAsync() , the images display as they should. Simplified version of my code: <ListView x:Name="MyList"> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <StackLayout Orientation="Horizontal"> <Label Text="Hello"> <Image Source=

Why does UWP continuous speech recognition stop

帅比萌擦擦* 提交于 2019-12-09 21:53:06
问题 I have a Windows 10 UWP app that I am enabling voice recognition for a text box. Yes, I know that I can also leverage Cortana for this. However, Cortana comes with some cons as well, mainly that you have little to no control over Cortana from within the app. This is where the Continuous Recognition of the SpeechRecognizer namespace comes in. I like the amount of control I have. However, it seems to randomly stop listening after some seconds. Here is how I have it implemented. Note that I also

Xbox one dev mode and Unity free version

痞子三分冷 提交于 2019-12-09 13:15:24
问题 I have a retail Xbox one console with Dev Mode activated Unity (latest free version) and a MSDN individual developer account. I am able to deploy test apps from Visual studio on the Xbox however i want to know how do i build and run apps on Xbox from Unity? I contacted unity and they said i need approval from my account manager however I'm an individual developer. What I want to do is deploy from Unity to Xbox one I'm running parallel from a Mac (Windows 10 version) but Unity is installed on

Microsoft.Windows.UI.Xaml.CSharp.targets missing on CI server

谁都会走 提交于 2019-12-09 08:09:02
问题 Problem I just committed the addition of a UWP application to source control. However, my CI server (Jenkins) didn't seem to like that: error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. This is stemming from the following UWP project file import: <Import Project="$(MSBuildExtensionsPath)\Microsoft

Universal Windows project - HttpClient exception

感情迁移 提交于 2019-12-09 07:25:23
问题 I'm trying to implement REST client in Universal Windows project (in Windows 10 universal app) using HttpClient, but the following line: var response = _client.GetAsync(address).Result; throws an AggregateException with the following message: Access denied. A network capability is required to access this network resource More surprisingly, the request isn't event sent to server. How can I solve this problem? 回答1: Double click on the Package.appxmanifest file in your project. Click on the