windows-10-universal

Windows UWP connect to BLE device after discovery

拈花ヽ惹草 提交于 2019-11-27 18:50:01
I'm using BluetoothLEAdvertisementWatcher to find nearby BLE devices and it's working well. After finding them I want to connect and read/write data via GATT. But I can't figure out how to use the API after getting the BluetoothLEAdvertisement ( https://msdn.microsoft.com/de-de/library/windows/apps/windows.devices.bluetooth.genericattributeprofile ). public class Adapter { private readonly BluetoothLEAdvertisementWatcher _bleWatcher = new BluetoothLEAdvertisementWatcher(); public Adapter() { _bleWatcher.Received += BleWatcherOnReceived; } private void BleWatcherOnReceived

How to use pre-designed SQLite in UWP project?

孤人 提交于 2019-11-27 16:30:43
问题 I have a SQLite database from another project and I want to use it in a UWP application. But I don't know how to import this database to the project and! 回答1: I can create a new Database and use it but I don't know how to copy database file from project. I use from SQLite.Net-PCL nuget package. For how to access an exist file, there are two locations that all apps can access. Details please reference the file-access-permissions. One is Application install directory . As @Henk Holterman said,

How to pass default credentials in Windows Authentication

余生长醉 提交于 2019-11-27 14:13:39
问题 I'm developing UWP application using C#.net and it has WCF service with Windows Authentication enabled. I struggling to pass default NetworkCredential after consume a service call using Add service reference option. Please find below my examinations. When I pass correct windows authentication credentials, it is working as expected. var service = new ServiceReference.Service1Client(); service.ClientCredentials.Windows.ClientCredential =new NetworkCredential("pradeep","****"); var test = await

Remove ios, windows8, and wp8 from Xamarin Forms PCL - nuget 3.0 opt-into error?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 08:32:55
I'm working on a Xamarin Forms project. I want to target Android and Windows 10 UWP. When I try to clean up the PCL by removing "Windows 8", "Windows Phone Silverlight 8", "Windows Phone 8.1", "Xamarin.ios", and "Xamarin.ios (classic)" from the PCL targets, I get the following nasty... I'm really just trying to remove WP8 as I don't care about targeting it. The project's targets cannot be changed. The selected targets require the project to opt-into NuGet 3.0 support, however, Visual Studio cannot automatically do this for you. Please uninstall all NuGet packages and try again. How do you get

send login data with POST method in a universal app

ぐ巨炮叔叔 提交于 2019-11-27 08:20:47
问题 I am working a windows app store,and I am trying to send login and password values,this is my code: try { string user = login.Text; string pass = password.Password; ASCIIEncoding encoding = new ASCIIEncoding(); string postData = "login=" + user + "&mdp=" + pass; byte[] data = encoding.GetBytes(postData); WebRequest request = WebRequest.Create("myURL/login.php"); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = data.Length; Stream

How to Copy and Resize Image in Windows 10 UWP

霸气de小男生 提交于 2019-11-27 06:52:25
问题 I have used the code from http://www.codeproject.com/Tips/552141/Csharp-Image-resize-convert-and-save to resize images programmatically. However, that project uses the System.Drawing libraries, which are not available to Windows 10 applications. I have tried using the BitmapImage class from Windows.UI.Xaml.Media.Imaging instead, but it does not seem to offer the functionality that was found in System.Drawing .. Has anyone had any luck being able to resize (scale down) images in Windows 10? My

How to launch a full-trust (desktop bridge) app from UWP with arbitrary parameters

萝らか妹 提交于 2019-11-27 06:17:42
问题 Is it possible for a UWP app to launch its Desktop Bridge (full-trust application component) with arbitrary command-line arguments? I see the ability to specify "argument groups" (see https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.FullTrustProcessLauncher), but it looks like that only supports using a predefined ParameterGroup . I need to launch a UWP with programmatically-determined (at launch time) arbitrary command-line arguments. Is this possible, and if so, how? 回答1:

UWP equivalent function to FindAncestor in uwp

半城伤御伤魂 提交于 2019-11-27 03:23:12
问题 I have a list of orders and when the order status is Cancelled , I want to blink the text. So far, my code works. However, sometimes it will throws exception: WinRT information: Cannot resolve TargetName lblOrderStatus For some reason lblOrderStatus can be found. So, I want to use "FindAncestor", but FindAncestor doesn't exists in UWP. Is there any equivalent function to FindAncestor in uwp? Here is my code: <ItemsControl x:Name="Orders" Grid.Row="1" Background="Transparent"> ... ... ...

Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 01:04:21
问题 I have a WinJS project that is previously built on Windows 8.1 using VS 2013. Recently I upgraded this project to Universal Windows 10 by creating a blank Javascript Universal windows 10 project and then added all my files from old project. I have Windows Runtime Components and also Class Library for SQLite. I added Universal Windows Runtime Component and Universal Class Library and copied all my files from old project to respective places. Somehow I managed to remove all the build errors. I

How to get unique Device IDs on Windows 10 Anniversary Update

别来无恙 提交于 2019-11-26 21:07:25
问题 Previous iterations of Windows 10 have the HardwareToken API (aka ASHWID) to get a unique identifier for the device, but it had several drawbacks: It was only available on Desktop and Mobile platforms, which required you to add an Extension SDK to your project (and wasn't available on HoloLens or other platforms) On the PC, the value could "drift" as hardware changed (even just plugging a laptop into a docking station would change the ID), so you needed complex backend logic to correlate