windows-runtime

Can I read an iPhone beacon with Windows.Devices.Bluetooth.Advertisement.BluetoothLEManufacturerData

对着背影说爱祢 提交于 2019-12-11 03:13:39
问题 According to the Bluetooth Advertisement sample, I need to set the CompanyID ( UInt16 ) and the Data ( IBuffer , a UInt16 in the sample) to start watching for advertisers. In the iPhone, I can set the beacon UUID to 4B503F1B-C09C-4AEE-972F-750E9D346784 . And reading on the internet, I found Apple's company id is 0x004C , so I tried 0x004C and 0x4C00 . So, this is the code I have so far, but of course, it is not working. var manufacturerData = new BluetoothLEManufacturerData(); // Then, set

XmlDocument.LoadXml() throws an exception of type ComException

青春壹個敷衍的年華 提交于 2019-12-11 02:58:47
问题 I'm trying to parse the xml document returned from this link but I get an exception of type ComException with the following message: Error HRESULT E_FAIL has been returned from a call to a COM component. Here's the code: try { //... string EPGXML = await DownloadAsync(url); var xmldoc = new XmlDocument(); xmldoc.LoadXml(EPGXML); //this line throws the exception //...rest of the code } catch (Exception) { //I get here... } Could you please help me why I get this message and how can I fix this?

How to use correct regional format (date & time) of Windows Phone 8.1

牧云@^-^@ 提交于 2019-12-11 02:53:58
问题 In WP8.1 region settings, one can set a country/region and a regional format. In my case I have United States as the country/region and German (Germany) as the regional format because of Cortana. However, the time picker as well as the date picker use 12hrs AM/PM format and the US date format mm-dd-yyyy. I can't find any property which tells me the regional format that's visible in the settings dialog of WP8.1. Is there any localization/globalization feature of Windows Phone Store apps, that

Access all files in folder from FileActivated file

半世苍凉 提交于 2019-12-11 02:53:12
问题 I write a Windows 10 Universal App like the default Photo App in C#. The Photo App allows to show all images in the directory where the user opened the file with the Photo App. But when the user opened a file with my App I get only the FileActivatedEventArgs with allows to display the file the user opened. I found no solution to show the user the other files from the directory of this file too. I think the problem is to get the permission to access that files because when the folder of the

In metro, what's the difference between FolderInformation and StorageFolder

假装没事ソ 提交于 2019-12-11 02:39:27
问题 FolderInformation 's methods/properties are nearly the same with StorageFolder 's. I can't figure out why WinRT api provides FolderInformation and StorageFolder as well. If I assign the list created from FileInformationFactory.GetFoldersAsync() to an ItemsControl , does it differ from the listed created from StorageFolder.CreateFolderAsync() ? The document says the FolderInformation provides synchronous access, but I don't know when the issue would happen. The one drawback I found in

Getting BLE Beacons in C++ Windows 10 Desktop Application

a 夏天 提交于 2019-12-11 02:36:44
问题 Has someone already figured out how to get BLE Beacons into a c++ desktop apps? I have some code from the following websites to get it done in c#: msdn sozial site and codefest.at post. Sorry, it's in german but the code is code but that'for C# and not c++ I also have the example from MS (msdn.microsoft.com/en-us/library/hh973459.aspx) how to use the WinRL For now I have the following code: #include "stdafx.h" #include <iostream> #include <Windows.Foundation.h> #include <wrl\wrappers

Bind IsSelected Property of ListBoxItem in ListBox with Multiple selection mode

纵然是瞬间 提交于 2019-12-11 02:36:14
问题 In WinRT App (C#) I have List<Item> items , which bind to ListBox . Class Item has 2 fields: string Name and bool IsSelected . As you already understood, I want to bind IsSelected field to IsSelected Property of ListBoxItem. Why I need this? Why I didn't use SelectedItems property of my ListBox ? When ListBox just loaded, I already have some Items, which must be IsSelected = true I don't want to create another collection to store all selected items. What I'm looking for? I'm looking for

VLC and MJPEG Decoder streaming (invalid header)

北城以北 提交于 2019-12-11 02:16:44
问题 I`m making a WinRT application which includes video streaming. Now I ended at VLC as streaming server and MJPEGDecoder lib (http://mjpeg.codeplex.com/) on client to decode video. But after creating HTTP stream and connecting to it from client, MJPEGDecoder says that header is invalid (it expects multipart stream). VLC-to-VLC works normal. Question 1 : how can it be fixed? Question 2 : what alternatives to create video streaming for WinRT? 回答1: Just to elaborate on your question/answer a bit

Child elements in XAML

岁酱吖の 提交于 2019-12-11 02:09:38
问题 I'm just learning XAML so bear with me. When you nest an element in XAML it seems like that element is set to the "Child" property of the parent UI. However in the following code the child element is set to the value. That sort of makes sense - kinda. However then Border Element below was set to the ControlTemplate, yet ControlTemplate has no Child element, so can someone tell me what exactly is the relationship between the Border and ControlTemplate below? May be you could re-write this

Unable to detect the selected FileTypeChoice from FileSavePicker

扶醉桌前 提交于 2019-12-11 01:56:29
问题 I would like to let the user choose a save option while selecting a file type. The selection works fine as in the below example. However after the user has selected a file type to be saved, I have not found a possibility to check which type he has selected. Please note: Both file type choices have the same extension. The difference between the two is the display name. var fsp = new FileSavePicker(); fsp.FileTypeChoices.Add("my file type", new List<string> {".extension"}); fsp.FileTypeChoices