win-universal-app

Windows UWP - WebView get selected Text

拈花ヽ惹草 提交于 2019-12-13 05:47:19
问题 Currently in my UWP app I am getting the Text-selection of a webview through DataPackage package = await webview.CaptureSelectedContentToDataPackageAsync(); and read out the string with await package.GetView().GetTextAsync(); This works perfectly on the PC but not on the phone. What would be the best way to go about it on the phone? I tried injecting javascript with window.getSelection().toString(); or document.selection.createRange().text; but it didn't work or I used it the wrong way. Any

Strech ListBox/ItemsControl in UWP

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 05:43:25
问题 I want to stretch a listbox horizontally and vertically in UWP. I tried some WPF solutions, but none of them worked. (Stretch line to width of Itemstemplate canvas in itemscontrol) What I tried: <Page.Content> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ListBox VerticalContentAlignment="Stretch" VerticalAlignment="Stretch" Background="Green"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch"

Is it possible that windows form application create app package?

回眸只為那壹抹淺笑 提交于 2019-12-13 05:36:40
问题 I use rassberry pi 2 with Windows 10 Iot Core.Remote machine of Visual Studio didn't work when I run the my universal windows project with İot Extention(it s say that deploy failed) so I send app package of my project from device portal and it run but I have windows form application and it dont create app package for sending to device portal. What can I do ? Is it possible that windows form application create app package? or what is any other possible way? 回答1: Windows Forms applications are

aforge image comparison with UWP

回眸只為那壹抹淺笑 提交于 2019-12-13 05:36:13
问题 I'm using portable.aforge.imaging for image comparison on a UWP project. The method ProcessImage requires Bitmap type as arguments. I'm using System.Drawing to access Bitmap class, but i'm getting errors when i try to instantiate: "Bitmap does not contains a constructor that takes 1 argument" Does regular Bitmap class is available on UWP? if yes, what am i doing wrong? if not, what alternatives do i have to use the aforge's ProcessImage for comparison? private void TestAForge() {

sqlite query not matching string

妖精的绣舞 提交于 2019-12-13 05:28:39
问题 I have a list of about 350 music files that I store in an sqlite table. If new files get added they are added to the db. So I have a query to check if the path of the file is in the table and if not then insert it. However 3 files never match the query even though they are in the table! Therefore they are added over and over each time I start my app. I am using SQLite for Universal Windows Platform & SQLite.Net-PCL packages for the sql content. File is my custom class that stores some strings

Transparent icon in start menu for universal app

那年仲夏 提交于 2019-12-13 05:18:57
问题 I'm developing a universal app. I have a list of icons in the manifest. The icon on the taskbar is fine, transparency works. The start menu icon doesn't have transparent edges. No edges. The list of icons that I have. How would I make the edges transparent? Should I add any other icons? 回答1: This is by design as the background (behind the tile itself) may be colored quite differently. In the start menu, there's a dark background whereas there's a white background in the Cortana search. Maybe

Find currently active user in xbox one UWP

≡放荡痞女 提交于 2019-12-13 04:33:10
问题 Using the below code I am able to get the list of all signed in users. Is there a way to know which is the current active user? IReadOnlyList<User> users = await Windows.System.User.FindAllAsync(); 回答1: I recently ran into this problem myself, and posted about it here. Someone responded there, and gave me some pretty big hints, which in turn helped me to get this solved. Here is the quick and dirty (my UWP is HTML/JavaScript based BTW): First, include the WinJS library in your project, if you

Windows Desktop Extensions - which version should I reference?

僤鯓⒐⒋嵵緔 提交于 2019-12-13 04:09:04
问题 Background: I'm having trouble getting my app's new version accepted by the Windows store. They say that it crashes on launch. The app runs fine even when installed from the appxbundle file on my computer. So I'm thinking maybe this has to do with the Desktop Extensions (for the UWP) that I've added. Perhaps I'm referencing the wrong version of that assembly. If the app is targeting version 16299 but min version is 14393 - which assembly of the desktop extensions should I include in the

Error: “This application can only run in the context of an app container.”

独自空忆成欢 提交于 2019-12-13 03:47:20
问题 I created a UWP app with desktop extensions and added the startup task as mentioned here. (I set Executable="AutoStartupTest.exe" .) I logged off and logged on and got the error in the title, and don't know how to fix it because though it makes sense - why is it not in a container? This should happen automatically, no? The link is talking about a UWP app. EDIT The extension snippet as requested here. <Extensions> <desktop:Extension Category="windows.startupTask" Executable="AutoStartupTest

'OperationCompleted' event not raised after 'Paste' operation

一个人想着一个人 提交于 2019-12-13 03:28:17
问题 The OperationCompleted event is supposed to be raised at the end of a Clipboard Paste operation as mentioned in DataPackage: OperationCompleted Occurs when a paste operation is completed. It's not. Why? / What's a workaround? Code : static void CopyToClipboard(string s) { DataPackage dataPackage = new DataPackage(); dataPackage.SetText(s); dataPackage.OperationCompleted += DataPackage_OperationCompleted1; Clipboard.SetContent(dataPackage); } static void DataPackage_OperationCompleted1