win-universal-app

UWP Place TextBlocks on Image

寵の児 提交于 2020-01-02 13:12:30
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the

UWP Place TextBlocks on Image

落花浮王杯 提交于 2020-01-02 13:12:22
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the

Highlighting words in RichEditBox

梦想与她 提交于 2020-01-02 08:54:46
问题 It is needed to highlight by fiven colour a substring in the document RichEditBox. For this purpose I wrote a method: private async Task ChangeTextColor(string text, Color color) { string textStr; bool theEnd = false; int startTextPos = 0; myRichEdit.Document.GetText(TextGetOptions.None, out textStr); while (theEnd == false) { myRichEdit.Document.GetRange(startTextPos, textStr.Length).GetText(TextGetOptions.None, out textStr); var isFinded = myRichEdit.Document.GetRange(startTextPos, textStr

Highlighting words in RichEditBox

倖福魔咒の 提交于 2020-01-02 08:54:40
问题 It is needed to highlight by fiven colour a substring in the document RichEditBox. For this purpose I wrote a method: private async Task ChangeTextColor(string text, Color color) { string textStr; bool theEnd = false; int startTextPos = 0; myRichEdit.Document.GetText(TextGetOptions.None, out textStr); while (theEnd == false) { myRichEdit.Document.GetRange(startTextPos, textStr.Length).GetText(TextGetOptions.None, out textStr); var isFinded = myRichEdit.Document.GetRange(startTextPos, textStr

Disable certain ListViewItem depending on custom property UWP

笑着哭i 提交于 2020-01-02 07:34:49
问题 I have a ListView that contains several types of custom UserControls . The project requires that some of them must be non-clickable, so I would like to disable them, but JUST THEM . Those items will be enabled/disabled depending on the value of a custom property. I've tried to set the ListViewItem.IsEnabled property to false , but it ain't worked, and the other solutions I've found around make no sense to me... I let a sample of the code: XAML <ListView x:Name="homeLW" Margin="0,5,0,0"

Error using using RenderTargetBitmap in UWP

余生长醉 提交于 2020-01-02 04:52:23
问题 I'm trying to create a bitmap image, and have the following code: RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap(); await renderTargetBitmap.RenderAsync(uielement); IBuffer pixels = await renderTargetBitmap.GetPixelsAsync(); . . . var pixelArray = pixels.ToArray(); In order to get a ToArray() extension, I came across this question. So I added: using System.Runtime.InteropServices.WindowsRuntime; // For ToArray To my code. However, when I run, I get the following error:

A dependent dll was not found

时光总嘲笑我的痴心妄想 提交于 2020-01-02 04:08:32
问题 My app does not run on "Release x86" when running the app it crashes immediately after the splash screen. Output shows the following exception: The program '[8204] dfz.exe' has exited with code -1073741515 (0xc0000135) 'A dependent DLL was not found'. It also tells me the module is build without symbols, however in build settings I have set debug info to Full. The first time I build the app for the Windows Store it built correctly and I also published that version to the store. When I did a

How to create a Tokenizing Control for UWP as known from Outlook when using To, Cc and Bcc

此生再无相见时 提交于 2020-01-01 17:01:07
问题 There is a great article about how to write a Tokenizing Control for WPF here: Tokenizing control – convert text to tokens But how is this accomplished in an UWP App? The Windows 10 UWP Mail client does this just fine, so I know that it is possible. But how? Tokenizing is super useful for To/CC/BCC input areas, as we know it from Outlook and lately from the Windows 10 UWP Mail client. I suspect that RichTextBlock or maybe RichEditBox combined with AutoSuggestBox could be part of the answer,

Visual State Manager in Windows 10 UWP not applying initial state on page load

不问归期 提交于 2020-01-01 05:27:11
问题 I have a page with a relative panel to re-organize based on width. However, it doesn't seem to apply any state at load unless the width is > 720px. If I resize the page after it's loaded both states work. A workaround would be to check the window size on page loaded and manually choose the state, but I believe this should be handled automatically? I have other pages that work, I'm not sure what I'm doing different. Here is a simplified version of my code, I have it set red/blue backgrounds so

Referencing C Dlls from Windows 10 Universal App Across CPU Architectures

半腔热情 提交于 2020-01-01 04:52:06
问题 Basic question/summary: I need to reference a binary (dll) created by someone else in C from a Win 10 universal app project. However, there is a separate dll for x86 and arm. I believe I need to reference the dll (or at least winmd file) from the project for it to be deployed, but I can only reference one file not both. That means the app fails on one platform or another (desktop or phone) because it has the wrong binary included. Looking for a solution. More detailed explanation; I am trying