windows-runtime

Retrieving the serial number of a device using WinRT

女生的网名这么多〃 提交于 2019-12-24 04:49:30
问题 We are working on an app that needs to know the serial number of the device it is running on. The app is for an insurance company with which the user is able to directly get insurance for the device. For the insurance policy the serial number is needed. Is it possible to retrieve the serial number of the device using the WinRT or any API that can be used in a metro style app? 回答1: I do not know if it exactly fits your need, but it is possible to uniquely identify a device (since Windows 8 RTM

Listing and connecting WiFi using WinRt

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 03:39:09
问题 In my office I have 10 WiFi routers.I want to list all those(similar to Network icon in the system tray on windows 8) and connect/disconnect to one of them through Win Rt. I tried these API Windows::Networking::Connectivity::NetworkInformation::GetLanIdentifiers(); Windows::Networking::Connectivity::NetworkInformation::GetConnectionProfiles(); NetworkInformation::GetInternetConnectionProfile(); but these Api only list connected one, it doesn't list others I can achieve this using http://msdn

Binding Hyperlink to richtextblock in windows 8 Metro app

。_饼干妹妹 提交于 2019-12-24 03:34:20
问题 I am building a windows 8 metro app for fun/learning etc. I have created a listview of text items that have descriptions, images etc. Inside the description, there are often hyperlinks that I would like to make clickable. However, when binding to a textblock, xaml hyperlink code is displayed as text. Searching arround, it looks like I need to use a richtextblock for hyperlinks. I can't seem to figure out how to bind a hyperlink to it. I have found many examples from wpf showing how to extend

High quality image scaling

老子叫甜甜 提交于 2019-12-24 03:18:20
问题 I have read this question, High Quality Image Scaling Library , but it only pertains to GDI+. When I scale down an Image in my app, it becomes very jaggy. I can't find any property on the Image class that allows me to increase the quality of the down-scaling. How can I do this? EDIT: I have now used this code: BitmapImage img = new BitmapImage(); img.UriSource = new Uri(Graphic, UriKind.Relative); return img; where Graphic is a string that contains the path to the image, but am getting this

Strange behaviour of combobox in WinRT

谁说我不能喝 提交于 2019-12-24 03:15:20
问题 Comboboxes in WinRT have a default ItemsPanel of type CarouselPanel. This gives Windows 8.1 apps an "infinite loop" when scrolling combobox items. If you don't want this behaviour, there are a lot of blog posts explaining how to "fix it". For example this: Cancel WinRT ComboBox infinte scroll effect or: http://netitude.bc3tech.net/2013/04/12/windows-8s-combobox-and-the-carouselpanel/ The problem with this solution is that you get a weird behaviour on the first item in the combobox. How to

Winrt - Adjusting flyout according to where it appears

大城市里の小女人 提交于 2019-12-24 03:03:23
问题 I have a GridView in a windows store project, that contains some big squares, and inside those i have a list of user images, when i tap on of those images a flyout appears on the right showing some information like this. the problem is that my gridview extends to the edges of the screen and beyond, and when that does i get this situation, i press the user with the red border near the edge of the screen and flyout appears on left. My flyout placement is set to Right, and im guessing since the

sqlite-net like statement crashes

橙三吉。 提交于 2019-12-24 02:56:11
问题 I have a SQL statement like this: Global.db.Query<Cards>("select * from Cards where card_name like ?", nameTextBox.Text); But I want to add % to both sides like this with the parameter value. Global.db.Query<Cards>("select * from Cards where card_name like %?%", nameTextBox.Text); But I'm throwing an error when I try to execute this. Any ideas why its crashing when I use the like statement like this? I ran the same query in my sqlite admin program with the same database and the results came

Display Current Video in Windows Phone 8 using AudioVideoCaptureDevice?

时光怂恿深爱的人放手 提交于 2019-12-24 02:33:47
问题 I've managed to setup code for a Windows Phone 8 Application that initializes and can start/stop recording video using an AudioVideoCaptureDevice. (saves it to an IRandomAccessStream) //Initialize Camera Recording Windows.Foundation.Size resolution = new Windows.Foundation.Size(640, 480); captureDevice = await AudioVideoCaptureDevice.OpenAsync(CameraSensorLocation.Back, resolution); captureDevice.VideoEncodingFormat = CameraCaptureVideoFormat.H264; captureDevice.AudioEncodingFormat =

Value Type Duration is not allowed on property Duration in XAML

耗尽温柔 提交于 2019-12-24 02:14:18
问题 I am trying to do the following with an ordinary Windows Metro style application: public class MyButton : Button { public Duration Duration { get; set; } } <Grid> <local:MyButton Duration="0:0:0.2" /> </Grid> But I receive the error: Value Type Duration is not allowed on property Duration in XAML Any idea what I might be doing wrong? Any help would be greatly appreciated. 回答1: This is a bug in the Visual Studio 11 Beta XAML compiler. You cannot set user-defined value type properties via XAML.

Where is the IID of IVpnManagementAgent defined

混江龙づ霸主 提交于 2019-12-24 01:01:39
问题 I'm trying to create an object of IVpnManagementAgent but I can't seem to find where the IID ( IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent ) of it is defined so I can instance RoGetActivationFactory as it seems it requires me a second parameter of REFIID . Also I saw this example but as I'm using C - I can't use __uuidof . Weirdly enough the msdn sample seems to omit this parameter. The problem is if I compile this code: #include <roapi.h> #define COBJMACROS #include <windows