uwp

An recommendations on displaying HTML without WebView

≡放荡痞女 提交于 2019-12-08 12:15:30
问题 The WebView control cannot be transparent. In addition, it sizes in ways that don't enable simple XAML development, but complex sniffing and resizing. I have a block of HTML that needs to be displayed in a simple, nice way. Is there any way to do this without WebView and parsing it all by hand? 来源: https://stackoverflow.com/questions/40183377/an-recommendations-on-displaying-html-without-webview

ScrollView not working on touch in Xamarin.UWP

三世轮回 提交于 2019-12-08 12:08:36
问题 I am trying to set the AbosoluteLayout.TranslatedTo for ContentView which contains the ScrollView. In that, ScrollView not working on touch but it is working on the Mouse interaction. I added the code in C# as propertiesView.TranslateTo(propertiesView.Width / 2, 0, 400, Easing.Linear); If I didn't use the AbsoluteLayout.TranslatedTo means ScrollView working on both interactions. How to resolve the problem? Here my code <AbsoluteLayout x:Name="absoluteLay" VerticalOptions="FillAndExpand"

UWP custom toast notification sound doesn't play on mobile

醉酒当歌 提交于 2019-12-08 11:35:09
问题 So I have an xml as notification body witch includes audio element with source (src) attribute pointing to preset windows sound and it doesn't play the sound I want and instead plays the default system sound. My notification xml looks like this (I use this as a test message to send trough Azure notification hubs debug option) <?xml version="1.0" encoding="utf-8"?> <toast> <visual> <binding template="ToastText01"> <text id="1">Test message</text> </binding> </visual> <audio src="ms

How to append text to file in a UWP app

僤鯓⒐⒋嵵緔 提交于 2019-12-08 11:25:51
问题 I need to create a simple log class (just a "save to file" method) in a UWP app for debugging purpose but AppendTextAsync is much different from ofstream and I don't know how to use. This is my class #pragma once ref class winRTLog sealed { public: winRTLog(); void save(Platform::String^ log); private: Platform::String^ myFilename = L"myLog.txt"; Windows::Storage::StorageFolder^ myFolder; Windows::Storage::StorageFile^ myFile; Windows::Foundation::IAsyncOperation<Windows::Storage::StorageFile

Always show the navigation arrows on a FlipView control in UWP

旧巷老猫 提交于 2019-12-08 11:09:02
问题 When using a mouse and hovering over a Universal Windows Platform (UWP) FlipView control the previous/next navigation buttons are shown. However, when using touch or pen, they remain hidden which may confuse users into not expecting additional content. I would like navigation buttons to always be visible. How can I do this? 回答1: We need to create a custom FlipView . Start with the code shown below: public class CustomFlipView : FlipView { protected override void OnApplyTemplate() { base

PropertyChanged Event Not Bubbling Up C#

两盒软妹~` 提交于 2019-12-08 10:50:52
问题 I'm designing a simple model that can be edited on a screen. In this case, it's for Xamarin Forms UWP, but this model class is platform agnostic, and I doubt that it's a UWP/Xamarin specific problem. I need the code to work so that if I edited any property in the model, the event should bubble up to the top, and I should be able to handle the PropertyChanged event on UserPreferences to save the record. But, this event never gets fired no matter which properties are changed. I can see that the

How to get the image already inside a RichEditBox in UWP

谁说胖子不能爱 提交于 2019-12-08 10:43:45
问题 I have a RichEditBox in UWP with an image already inserted inside. When the image was inserted it was given a certain width and height (in pixels). Now, after the image has been inserted, I would like to select the image and edit the dimensions. Is there any way to achieve this? Also, I have seen a similar thread that has an incorrect answer. Please remember this is for WINRT (UWP). How to get image from RichEditBox 回答1: I would like to select the image and edit the dimensions Firstly, you

AES Encryption Not Working Properly in UWP

二次信任 提交于 2019-12-08 10:43:44
问题 We have an C++ application where it encrypts password using AES algorithm through openssl API's ( EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex ). Now I try to develop UWP application through which I want to do same authentication as the above legacy app does. But when I'm using API's from "Windows.Security.Cryptography" my authentication fails as the encrypted data output is different from the legacy app, so decryption fails and there by authentication. Legacy app uses one Key

UWP http client delay in getting response

自作多情 提交于 2019-12-08 10:38:19
问题 I found this peculiar behaviour of UWP HttpClient. For a simple get call of WCF service is taking time almost more than 100 seconds(happens for first few calls). I observed that the same service is way too faster in iOS and rest client. Attaching the code, Please let me know, if i doing wrong. HttpClientHandler clientHandler = new HttpClientHandler(); clientHandler.UseCookies = true; var client = new HttpClient(clientHandler); client.Timeout = TimeSpan.FromSeconds(100); client

how to solve access denied when using UWP GetFolderFromPathAsync

霸气de小男生 提交于 2019-12-08 10:38:16
问题 I'm getting access denied when trying to access file system from my UWP app by using GetFolderFromPathAsync. My UWP app needs to access the Windows 10 file system. I'm using broadFileSystemAccess but am stuck. My code below gets "access denied" when it does GetFolderFromPathAsync. And when I try to set the manifest file type, I get the errors below. Any help greatly appreciated. My code StorageFolder test_StorageFolder = await StorageFolder.GetFolderFromPathAsync(@"C:\demo"); StorageFile