windows-8

Windows 8 Bluetooth Low Energy API example

浪子不回头ぞ 提交于 2019-12-10 10:18:00
问题 Has anyone found a good example of how to discover, connect, and disconnect BLE devices on Windows 8 using C/C++? I'm not sure how to get a device handle to use with the "Bluetooth Low Energy Functions" API http://msdn.microsoft.com/en-us/library/windows/hardware/hh450825(v=vs.85).aspx 回答1: The Windows 8 Bluetooth GATT apis requires that the device be paired using the built-in UI and does not allow application to connect to an arbitrary Bluetooth LE device. Source: MSDN Forum 回答2: MSDN has

Saving data during the OnSuspending method

纵然是瞬间 提交于 2019-12-10 10:16:44
问题 For a Windows 8 Application in C/XAML I have to store some data to the LocalState folder. I have some trouble using async/await operator I think. When I am saving datas while the application is running, everything works fine, but when I try to save the data during the OnSuspending method, it seems that my application doesn't wait for my saving method to be finished to suspend the application. The stranger thing is that when I'm debugging and doing all the operation step by step slowly

How to have user prompt dialogs in Windows 8 metro apps?

微笑、不失礼 提交于 2019-12-10 10:11:25
问题 I would like to get some user inputs for my app like Name, DOB, etc from a modal window for this I need a dialog to be displayed which would contain the textboxes and other controls. Normally in WinForms/WPF I would create a class inherited from the Form/Window class and use the Show/ShowDialog method to present the form to the user How do I achieve this behavior in Windows 8 metro apps using XAML/C# ? I have looked at the MessageDialog class under the Windows.UI.Popups namespace but its for

How to debug a Windows Store app that crashes on a customer's machine?

雨燕双飞 提交于 2019-12-10 10:06:08
问题 I got a support email from a customer saying his app crashes when it starts and all he gets is a message like: (App Name) ran into a problem You can send info to Microsoft about what went wrong to help improve this app. Files that will be sent to Microsoft C:\Users\User_Name\AppData\Local\Temp\WER####.tmp.appcompat.txt C:\Users\User_Name\AppData\Local\Temp\WER####.tmp.hdmp I thought - Microsoft isn't going to help them really with my silly app. They should send the dump file to me for

Windows 8 App Cert Kit no longer runs?

人盡茶涼 提交于 2019-12-10 08:06:10
问题 I am trying to do the App Cert check on my Metro app, but it won't run anymore! Anybody else having this same issue? I've searches all over the Internet, with not even a single related result. It ran successfully a few hours ago, but now it just won't run at all. The spinning cursor shows, indicating that it's about to open - but it doesn't. I've tried restarting my computer, opening/closing visual studio, opening/closing my app. It just doesn't run. I've tried running as Admin, I've even

HRESULT 0x80072EE4 when using BackgroundDownloader

霸气de小男生 提交于 2019-12-10 07:52:00
问题 Every time when I call CreateDownload on a BackgroundDownloader in my C# code for a Windows Store application, I get the following exception: Exception from HRESULT: 0x80072EE4 . I have declared all necessary capabilities in my package file. Example This code breaks when CreateDownload() is called: public static async void DownloadFile(string url){ var uri = new Uri(url, UriKind.Absolute); FileSavePicker openPicker = new FileSavePicker(); openPicker.SuggestedStartLocation = PickerLocationId

How to show basic HTML Windows8 Metro style TextBlock?

北战南征 提交于 2019-12-10 05:48:04
问题 I have an html page that only contains <p> , <strong> , <br /> and <a> tags. I want to show this content in a XAML TextBlock in Windows 8. Is there any way to show that content in a TextBlock without losing the structure (e.g. paragraphs)? I don't want to use WebView because WebView can not be transparent. 回答1: I am developing a open source Windows 8 Metro RSS Reader app and I used HtmlUtilities.ConvertToText You can see the source code implementation here http://metrorssreader.codeplex.com

How to call REST services from Portable Class Library?

喜你入骨 提交于 2019-12-10 04:33:48
问题 My target projects are Windows 8, WinRT and Windows Phone 8. I am using Portable Class Libraries for the solution in order to share the sources. I need to call some REST services created in another MVC Web Api project but HttpClient class is not available in the PCL. Which would be a good approach to solve it? I was thinking in a service interface and then to create a project for each platform, using HttpClient , WebClient or the appropriate class in each case. This approach could work but I

Does Windows 8 Compile JavaScript?

拥有回忆 提交于 2019-12-10 04:24:44
问题 It is exciting that Windows 8 is supporting so many languages for Metro App development. One that especially interested me was the HTML5/CSS/JavaScript. What I don't understand, is this code going to get compiled in a sort of executable (like the C#, VB, and C++ option), or would my app basically be running in IE as an actual web page? 回答1: Yes. Javascript is executed on Windows 8 by the Chakra engine. Similar to the .NET just-in-time compiler, it translates javascript to optimized machine

Windows 8 - BeginAnimation?

扶醉桌前 提交于 2019-12-10 03:16:53
问题 It seems I can't do myObject.BeginAnimation(dp , animation) . Is this a bug or has it been changed? 回答1: You need to use a storyboard. Add your animation to the storyboard and have the storyboard begin the animation. var storyboard = new Storyboard(); var opacityAnimation = new DoubleAnimation { From = 0, To = 1, Duration = DurationHelper.FromTimeSpan(TimeSpan.FromSeconds(1)), }; storyboard.Children.Add(opacityAnimation); Storyboard.SetTargetProperty(opacityAnimation, "Opacity"); Storyboard