win-universal-app

“Symbols for the module MyLibrary.dll were not loaded”?

一曲冷凌霜 提交于 2019-12-05 09:16:53
问题 I'm trying to learn Windows Phone dev by making a basic app that provides information about Pokemon. To do this, I've created a portable class library (PokeLib.dll) so it's compatible with universal apps. I've tested this via a project in the same solution ("Test"), and it works fine. You can take a look at the code for these on my Github, but as far as I can tell, it's all good. These two projects are in the one solution. For the Windows Phone app's solution, I added PokeLib as an "existing

Windows UWP Extended splash screen image rendering incorrectly on mobile

為{幸葍}努か 提交于 2019-12-05 08:44:55
I built an extended splash screen for my windows uwp application. I followed the example code including the xaml for extended spash screen from this page Display a splash screen for more time It renders correctly on the desktop window, it is centered perfectly and aligned exactly with the initial splash screen image, however when I try a mobile emulator, (I tried one of 5 inch screen at 720p) the extended splash screen page image seems too large (it looks almost twice or three times larger), and appears cut off to the bottom right of the page, I'm assuming the progress ring is below the image

Error using using RenderTargetBitmap in UWP

浪子不回头ぞ 提交于 2019-12-05 08:36:49
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: Exception thrown: 'System.ArgumentException' in System.Runtime.WindowsRuntime.dll Additional information: The

Change default User-Agent in WebView UWP

人走茶凉 提交于 2019-12-05 08:22:06
I need set custom UA and I use httpRequestMessage.Headers.Add("User-Agent", "blahblah"); theWebView.NavigateWithHttpRequestMessage(httpRequestMessage); But if I click any link on page this UA erased and set default UA. I found same question WebView - Define User-Agent on every request but maybe it fixed in 1607? Jay Zuo WebView is not a general-purpose browser, it does have some "limitations" that not supported now. There is no API can set the default User-Agent that used in every request. As a workaround we can use WebView.NavigationStarting event along with WebView

How can I replace Marshal.SizeOf(Object) with Marshal.SizeOf<T>()?

徘徊边缘 提交于 2019-12-05 08:12:10
I am building a Universal class library from existing code, and I get some compiler warnings that I for the life of it cannot figure out what to do with. I have code like this: void SomeMethod(Object data) { var size = Marshal.SizeOf(data); ... } The code builds, but in the Universal project (and, I guess, .NET 4.5.1 and higher projects) I get the following compiler warning: warning CS0618: 'System.Runtime.InteropServices.Marshal.SizeOf(object)' is obsolete: 'SizeOf(Object) may be unavailable in future releases. Instead, use SizeOf<T>(). But how do I create a replacement for Marshal.SizeOf

Disabling or removing the close button from uwp app

瘦欲@ 提交于 2019-12-05 08:01:14
问题 Universal app does not allow to remove or disable the close button it seems. We can hide it by going full screen. But when moving cursor over it, brings title bar back. Is there any way to remove the close button? Reason : I am working on screen time. After allowed time gets over, I want to block the screen. I should remove close button so that user cant get over my app. Edit : Removing close button wont help completely. It is a part of work. I am just asking how to remove it. 回答1: With

Universal app - Loading combobox' ItemsSource async gives weird behaviour

穿精又带淫゛_ 提交于 2019-12-05 06:11:47
While working on an Universal App (currently only on the WP8.1-side), I've stumbled upon the following weird thing. I've got a ComboBox, the UserControl (located in the WindowsPhone-project) it's in is binded to a VM in the Shared project. Both the ItemsSource and SelectedItem are binded to their respective properties in the VM. When running the application, when you select any item except the first one, it is working perfectly. But, when I select the first item, the string displayed in the ComboBox shows the .ToString() -method of the VM instead... (Btw, it's a simple List<string> , the

Can't deploy to HoloLens emulator

自古美人都是妖i 提交于 2019-12-05 05:54:33
Just created default project Holographic DirectX11 App (Universal Windows) in VS2015 Update 2 with HoloLens emulator installed and hit F5. HoloLens emulator starts loading, but at some point The emulator is unable to connect to the device operating system: The emulator is unable to determine the host IP address, which is used to communicate with the guest virtual machine. Some functionality might be disabled. I can start emulator from Hyper-V Manager and connect to it, but the screen is not responding to mouse clicks and stuck with start menu (same picture in emulator window if I start it from

How to connect W10 Universal App with MySQL database

旧时模样 提交于 2019-12-05 05:11:06
I'm writing my first Windows 10 Universal App that operates on MySql database. I used code from this guide (It's for Windows 8 store apps): https://blogs.oracle.com/MySqlOnWindows/entry/how_to_using_connector_net But when I try to open connection with my database I get error: An exception of type 'System.NotImplementedException' occurred in >MySql.Data.RT.dll but was not handled in user code Additional information: SSL not supported in this WinRT release. public class DBconnector { static string server = "127.0.0.1"; static string database = "hurtownia"; static string user = "root"; static

how to change background color of button in UWP Apps in c# ?

爷,独闯天下 提交于 2019-12-05 03:37:39
I have a simple and I need to change colors of my buttons every second in that . I use this code btnBlue.Background = new SolidColorBrush(Windows.UI.Colors.Blue) But it doesn't contain my custom color that I have use in xaml like #FF30B3DD ! So what should I do ? can anybody help me ? You can use Color.FromArgb() to define a custom color in code: btnBlue.Background = new SolidColorBrush(Color.FromArgb(255, 48, 179, 221)); Alternatively, you can define the color in XAML in advance as a resource: <Page.Resources> <SolidColorBrush x:Key="BlueColor" Color="#FF30B3DD" /> </Page.Resources> You can