uwp

How to encode/decode url strings in an UWP App

时光怂恿深爱的人放手 提交于 2019-12-23 09:11:41
问题 I'm building a UWP App which communicates with a Web-Api. At some Point I'm sending a string in the url to the Web-Api which can be manipulated by the user. Because of that the string can include characters which could do evil things to the Web-Api. For example: This is my UserController [Route("api/user/{uid}")] public User GetUser(string uid) { return userRepository.GetByUid(uid); } For the sake of this example we assume that the user can put in the uid manually in a textbox. Now if he puts

How to resize Webview height based on HTML content in Windows 10 UWP?

落花浮王杯 提交于 2019-12-23 07:00:10
问题 I am currently working on Windows 10 UWP App and facing an issue with WebView that when I have less HTML content, I am getting more height in javascript. My Code is as follows WebView webView = new WebView() { IsHitTestVisible = true }; string notifyJS = @"<script type='text/javascript' language='javascript'> function setupBrowser(){ document.touchmove=function(){return false;};; document.onmousemove=function(){return false;}; document.onselectstart=function(){return false;}; document

Can't Build app Packages for UWP store submission

邮差的信 提交于 2019-12-23 06:16:05
问题 I have written a Xamarin.Forms application and now I want to deploy the UWP project to the store but I can't create app packages. When using Microsoft.NetCore.UniversalWindowsPlatform 6.2.2 or 6.2.0-preview I in release mode, I constantly get this error : Payload contains two or more files with the same destination path 'System.Runtime.CompilerServices.Unsafe.dll'. Source files: C:\Users\john.nuget\packages\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\6.2.0-preview1-26926

Inherit UserControl and hooking up to basic property events

有些话、适合烂在心里 提交于 2019-12-23 05:40:57
问题 I'm making a custom TextBox for UWP to simplify Win2D outlined text solution, for that I created a UserControl that contains only a canvas on which I'll draw the text. Of course I need some properties, like text, outline thickness and color, etc... I also need some properties that are already exposed by the inherited UserControl like Foreground, FontSize, FontFamily... So far so good, it seems like I won't need to implement each one of those common properties. The problem is that I can't find

Grouping ListView under PivotItem in Windows 10 UWP

拟墨画扇 提交于 2019-12-23 05:18:08
问题 I am currently working on grouping Listview based on billing_id in my case. I am proper able to retrieve group by items using GroupBy of LINQ, but I am facing issues while displaying it. It displays as an entire page and not as a child of PivotItem. My code is as the following. First I created a CollectionViewSource in Page resources as follows <Page.Resources> <CollectionViewSource x:Key="cvs" x:Name="cvs" IsSourceGrouped="True" /> </Page.Resources> Then I retrieved all the list using

Does Windows 10 Mobile support the Fluent Design System for UWP apps?

巧了我就是萌 提交于 2019-12-23 05:11:57
问题 I'm developing a new UWP app with the Fluent Design System (Acrylic Background and reveal) but apart from being available on Windows 10 Desktop, I also want to publish the application to Windows 10 Mobile. Does Windows 10 Mobile support the Fluent Design System? Or do I have to develop another application just for Windows 10 Mobile without the Fluent Design System? 回答1: Windows 10 Mobile build 10.0.15063 (Creators Update) supports composition effects as well as in-app acrylic (see How to use

Looping FlipView for UWP

ⅰ亾dé卋堺 提交于 2019-12-23 05:09:19
问题 Is there any way to make a FlipView loop through items? From the last item, to the first and viceversa. I have seen this solution http://blogs.msdn.com/b/synergist/archive/2013/09/21/windows-8-flipview-looping-sample.aspx It works for W8, OK, but the same code throws under the Windows Universal Platform (Universal App). 回答1: The solution you've mentioned is right, you can refer to this solution to implement your own. But the sample linked in the article doesn't work because there is a minor

VS2017 15.4 Preview “Windows Application Packaging Project” tool failed to generate a working app

不想你离开。 提交于 2019-12-23 05:02:23
问题 I added the new "Windows Application Packaging Project" that comes with vs2017 15.4 preview. When adding my project to the "Applications" and debugging the packaging project I have the following error: System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.' InnerException: FileNotFoundException: Could not load file or assembly

How to show the UWP ShellBackButton as a button in Template10?

本秂侑毒 提交于 2019-12-23 04:59:15
问题 I need to show the UWP ShellBackButton as a button in my user control in Template10. The ShellBackButton is the back button on top left in the application but I need to show this as a button in the main screen so the user can click on it. I have researched this, but could not find how to do this. There a property in App.xaml.cs to show the button on top left, that is ShowShellBackButton and I want to have this as a button in my user control view. 回答1: As from the comments, i thought it's

How do I wait for an element using the WinAppDriver in UWP?

烂漫一生 提交于 2019-12-23 04:49:17
问题 I'm currently migrating my Coded UI Tests for a UWP app to Appium using the WinAppDriver and I have come across the issue, that I can't wait for an element to show up. There is no way to wait for a element to be "ready" as the Coded UI Test from Microsoft did. In the ClassInitialize method everything works fine (data is entered on the login view) and the login button is clicked. After the click event is triggered the app shows a progress bar until the user is logged in. My problem is that I