uwp

UWP API in ASP.NET

核能气质少年 提交于 2020-01-30 06:16:08
问题 I'd like to use a piece of Windows 10 specific UWP API (specifically, the Windows.Graphics.Printing3D stuff) in an ASP.NET code-behind DLL. Is there any way to do so? 回答1: While looking for a .NET-only resolution to this one, I've found a moderately clean way - a Win32/64 C++ DLL that would consume UWP API and present a COM- or P/Invoke-based interface to .NET. Create a regular Win32 DLL. Build an interface for .NET to consume - exported functions or objects, depends. In my case, a single

【UWP】使用 LiteDB 存储数据

白昼怎懂夜的黑 提交于 2020-01-28 22:31:02
原文: 【UWP】使用 LiteDB 存储数据 序言: 在 UWP 中,常见的存储数据方式基本上就两种。第一种方案是 UWP 框架提供的 ApplicationData Settings 这一系列的方法,适用于存放比较轻量的数据,例如存个 Boolean 类型的设置项这种是最适合不过的了。另一种方案是用 Sqlite 这种数据库,适合存放数据量大或者结构复杂,又或者需要根据条件查询的场合,例如开发个宝可梦数据查询,或者 Jav 图书馆(咳咳)。 场景分析: 在某些场合,我们很可能是要持久化一个复杂的对象的,例如通过 OAuth 授权成功获取到的用户信息,有可能就类似下面的结构: { "id": 1, "name": "Justin Liu", "gender": 2, "location": { "name": "Melbourne", "name_cn": "墨尔本" } } 又或者做一个 RSS 阅读器,弄个后台服务提前先把数据拉下来,那肯定也要存放起来吧。这相当于要把一个以时间排序为依据的列表进行持久化。 ApplicationData Settings 方案 在以上两种场合,用 ApplicationData Settings 解决起来可能是比较快速的。以第一种情况来说,又可以细分两种存储方案。 A 方案,分字段存放: ApplicationData.Current

How to Javascript notify() with ms-appdata on Windows 10 UWP

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-26 03:27:09
问题 Due to file-writing security issues we have tried to switch our app from using ms-appx-web: to using ms-appdata:. But it immediately fails because we rely on window.external.notify() which works fine with ms-appx-web: but seems to behave as a no-op with ms-appdata:. As a test we loaded the following html into a WebView object: <html> <head> <script> function demofunc( str ) { document.getElementById("demo").innerHTML += str; window.external.notify( str ); } </script> </head> <body onLoad=

Convert UWP WriteableBitmap to XamarinForms Image

心不动则不痛 提交于 2020-01-25 23:45:33
问题 is there a way to convert a UWP WriteableBitmap to a XamarinForms Image? Trying a simple convert ends up with "cannot implicitly convert type WriteableBitmap to Xamarin Forms Image". Do I have to convert it before to a base64 string? Or how would you handle that? thanks 回答1: You could find FromStream method in the Xamarin.Forms.ImageSource . For your requirement, you could get stream of WriteableBitmap form uwp project via DependencyService. And converter it to ImageSource in the PCL. Example

C++ struct/union into C# struct

你说的曾经没有我的故事 提交于 2020-01-25 21:37:10
问题 How do I convert this struct/union from C++ code into my C#-UWP-code? The important thing is, that the logic and references does not change because this struct must be sent to a server. the difference to this article ( Convert C++ struct to C# ) i have got nonprimitive datatypes (as another struct and long[]) in my struct i have got unions in my struct typedef struct _HEADER { _HEADER_TYPE HeaderType; ULONG cc; union { struct { LONG Protocol; _TYPE CType; _INFO InfoDesired; // -> that's

How to handle Line Chart that keep expanding in both Independent and dependentValues

吃可爱长大的小学妹 提交于 2020-01-25 21:16:09
问题 How to handle the Independent and dependentValuePath that keep expanding in every 10 minutes? Will including ScrollViewer handle this scenario? Suppose, below is the chart in use: <Charting:LineSeries Title="station1" Margin="0" FontSize="16" FontWeight="SemiBold" IndependentValuePath="Q_interval" DependentValuePath="Q_size" IsSelectionEnabled="True"> <Charting:LineSeries Title="Terminal 1" Margin="10" FontSize="16" Foreground="Blue" FontWeight="SemiBold" Foreground="Purple" BorderBrush="Red"

Data binding UWP(C#)

北城以北 提交于 2020-01-25 21:11:09
问题 I writing app for UWP. I try to use data binding. I have classes public class Billing { public string first_name { get; set; } public string last_name { get; set; } public string company { get; set; } public string address_1 { get; set; } public string address_2 { get; set; } public string city { get; set; } public string state { get; set; } public string postcode { get; set; } public string country { get; set; } public string email { get; set; } public string phone { get; set; } } public

Data binding UWP(C#)

a 夏天 提交于 2020-01-25 21:10:08
问题 I writing app for UWP. I try to use data binding. I have classes public class Billing { public string first_name { get; set; } public string last_name { get; set; } public string company { get; set; } public string address_1 { get; set; } public string address_2 { get; set; } public string city { get; set; } public string state { get; set; } public string postcode { get; set; } public string country { get; set; } public string email { get; set; } public string phone { get; set; } } public

Installation Failed after creating UWP with Desktop App Converter

前提是你 提交于 2020-01-25 12:54:17
问题 I decided to have another crack at converting my tool (https://github.com/mikecann/Windows7-Taskbar-Monitor) to a windows store app using the Desktop App Converter. Things I did this time: 1) Force-updated my machine to the anniversary update. 2) Downloaded Desktop App Converter and .wim file. 3) Setup the base image .wim 4) Ran the converter on my self-extracting installer with the following: .\DesktopAppConverter.ps1 -Installer C:\tmp\TaskbarSystemMonitorInstaller.exe -InstallerArguments "

UWP App package information sample app - where it is showing package identity

被刻印的时光 ゝ 提交于 2020-01-25 10:54:05
问题 Using VS2017 latest version 15.9.5 I successfully deployed this UWP Package sample (using their C# folder) from Microsoft's GitHub site on my Windows 10 Pro ver 1809 laptop. But on the sample app's main window (shown below), when I click 1) Identity --> Get Package it doesn't seem to show the package identity. Question : What I may be missing or misunderstanding here? NOTE : According to the above mentioned Microsoft article: Each package is defined by a globally unique identifier known as