windows-runtime

UWP Composition API: Rounded Corners?

依然范特西╮ 提交于 2020-12-07 18:31:38
问题 I'm struggling to figure out to to create rounded corners of content using Composition API. This is where I'm at, any help would be much appreciated: void CreateRoundedCorners(Vector2 cornerRadius, CompositionSurfaceBrush imageSourceBrush, SpriteVisual targetVisual) { CompositionRoundedRectangleGeometry roundedRectangle = _compositor.CreateRoundedRectangleGeometry(); roundedRectangle.Size = new Vector2(; roundedRectangle.CornerRadius = cornerRadius; CompositionSpriteShape spriteShape =

UWP Composition API: Rounded Corners?

时间秒杀一切 提交于 2020-12-07 18:29:58
问题 I'm struggling to figure out to to create rounded corners of content using Composition API. This is where I'm at, any help would be much appreciated: void CreateRoundedCorners(Vector2 cornerRadius, CompositionSurfaceBrush imageSourceBrush, SpriteVisual targetVisual) { CompositionRoundedRectangleGeometry roundedRectangle = _compositor.CreateRoundedRectangleGeometry(); roundedRectangle.Size = new Vector2(; roundedRectangle.CornerRadius = cornerRadius; CompositionSpriteShape spriteShape =

Get SystemMediaTransportControls for other window

岁酱吖の 提交于 2020-07-10 10:32:10
问题 I'm interesting in ISystemMediaTransportControlsInterop::GetForWindow method. The documentation is outdated for it. But I have found files SystemMediaTransportControlsInterop.h and SystemMediaTransportControlsInterop.idl in folder C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um of Windows SDK. They are describing GetForWindow method. So, how can I get an instance of ISystemMediaTransportControlsInterop and call this method? WinRT contains only method

Windows 8 WinRT KeyboardCapabilities.KeyboardPresent is always true

空扰寡人 提交于 2020-06-14 06:49:35
问题 We are using KeyboardCapabilities.KeyboardPresent to test if a keyboard is connected to a device: bool hasKeyboard = new KeyboardCapabilities().KeyboardPresent == 1; Unfortunately it's always TRUE regardless if a bluetooth keyboard is connected or not. We tried it with the following hardware: Dell Vostro 470 is a desktop PC with wireless Bluetooth keyboard which has power ON/OFF options. http://www.dell.com/in/business/p/vostro-470/pd Samsung 700T Notebook (Slate) http://www.samsung.com/uk

Xbox 360 Wireless Controller is not working via C++/WinRT and Windows.Gaming.Input API in console application

落爺英雄遲暮 提交于 2020-06-13 07:08:06
问题 I trying to use Windows.Gaming.Input API via C++/WinRT from Windows Console Application and it is not working as supposed with Xbox 360 Wireless Controller (reported as Xbox 360 Wireless Receiver for Windows (0x045e:0x0000) ). I got GamepadAdded event, then trying to read gamepad state via gamepad.GetCurrentReading() and seems GamepadReading struct is not filled at all for Xbox 360 Wireless Controller . Also I found that there is some strange error message on MSVS debug console: onecoreuap