windows-runtime

Cropping tool after file picker (like the one after you take a picture)

霸气de小男生 提交于 2020-01-15 09:25:41
问题 When you take a picture with the integrated camera, windows 8 automatically starts a cropping tool. You can enable it with this code: CameraCaptureUI cameraUI = new CameraCaptureUI(); cameraUI.PhotoSettings.AllowCropping = true; I need something similar for a picture which is chosen from the file picker. Is there any way to use the same Image-Cropper-Tool in the FilePicker as for the camera or do I have to implement it on my own? 回答1: You need to implement on your own. Check out this awesome

Get user information in Windows 8?

守給你的承諾、 提交于 2020-01-15 09:13:19
问题 I have created a sample in Windows 8 using C# and XAML to get user info of my system which includes Name, Email Id, Photo of my User Login. I am able to get Name and image but I am not able to get Email Id. My system is logged in by my hotmail id. Following is the code: how can I achieve to get email id? string displayName = await UserInformation.GetDisplayNameAsync(); string Emailid = await UserInformation.GetPrincipalNameAsync(); StorageFile image = UserInformation.GetAccountPicture

Does WinRT _really_ support thread local storage functions (Tls*)?

会有一股神秘感。 提交于 2020-01-15 09:10:59
问题 I'm porting legacy Windows code to Windows Runtime (WinRT), specifically Windows Phone 8.1. The code contains calls to thread local storage functions like TlsAlloc, TlsFree, TlsGetValue, and TlsSetValue. According to MSDN's "Win32 and COM for Windows Runtime apps (system)" page, these four TLS functions are supported under WinRT. Reading the TlsAlloc documentation, for example, one reads: Windows Phone 8.1 : This function is supported for Windows Phone Store apps on Windows Phone 8.1 and

Does WinRT _really_ support thread local storage functions (Tls*)?

Deadly 提交于 2020-01-15 09:09:42
问题 I'm porting legacy Windows code to Windows Runtime (WinRT), specifically Windows Phone 8.1. The code contains calls to thread local storage functions like TlsAlloc, TlsFree, TlsGetValue, and TlsSetValue. According to MSDN's "Win32 and COM for Windows Runtime apps (system)" page, these four TLS functions are supported under WinRT. Reading the TlsAlloc documentation, for example, one reads: Windows Phone 8.1 : This function is supported for Windows Phone Store apps on Windows Phone 8.1 and

Windows Phone 8.1 Runtime Text Outline

被刻印的时光 ゝ 提交于 2020-01-15 07:27:11
问题 Is there a way to show text outline on a TextBlock ? I am showing some text on top of map control and would like to show the text in black with white outline so it's always readable. Something like this: Thanks for any tips 回答1: This sort of font manipulation isn't supported in Windows.UI.Xaml, but you can interop to DirectWrite to draw text with effects into a bitmap and then composite the bitmap on top of your map. For static text you can either pre-create a bitmap or convert the font to

Expose the properties of a usercontrol which is built in MVVM

一个人想着一个人 提交于 2020-01-15 06:49:48
问题 There are lots of questions like this one, but still can't get what I really want, and all of them have something that differs of mine and that is: I have a UserControl : Built separately in a class library project called UCProject ; The project UCProject has a View for the control, and its ViewModel ; The UserControl binds some of its own controls and UIElements properties in the View to properties declared in the ViewModel in, of course, the UCProject; How can I show or expose or make the

Replace `Page` with `WinRTXamlToolkit.Controls.AlternativePage`

回眸只為那壹抹淺笑 提交于 2020-01-15 06:10:48
问题 I'm attempting to use Windows RT XAML Toolkit so that I can have access to the TreeView control. I've created a new BlankApp that contains a MainPage containing XAML similar to this: <Page x:Class="BlankApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:BlankApp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006

Windows 8 App Local Storage

删除回忆录丶 提交于 2020-01-14 22:23:30
问题 I am trying to develop Windows 8 apps using C# and I need to store two list's (string and DateTime) in local settings List<string> names = new List<string>(); List<DateTime> dates = new List<DateTime>(); I used LocalSettings for that according to this page: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh700361 Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; But I have problems while I am storing Lists and getting

Define a Thickness using resources

╄→尐↘猪︶ㄣ 提交于 2020-01-14 14:16:28
问题 In a windows UWP app project, I am trying to define a Thickness by assigning to its Left , Top , Right and Bottom properties: <Setter Property="Margin"> <Setter.Value> <Thickness Left="{StaticResource SomeDouble}" Top="0" Right="0" Bottom="0" /> </Setter.Value> </Setter> This answer seems to suggest that this is possible in WPF, however, in my UWP project (as well as in a WinRT app), I get the following error: XAML Thickness type cannot be constructed. In order to be constructed in XAML, a

WinRT: How do I ensure Images are drawn in a pixel-perfect way on a Canvas?

你离开我真会死。 提交于 2020-01-14 09:38:12
问题 I am adding Image instances to a Canvas in Windows Runtime environment and my image keeps getting scaled up when in 140 and 180 scale resolution displays, it looks perfect in scale resolution 100. I tried creating 3 PNG images, one for each scale size: 100, 140, 180 but it still scales them up and they look blurry. I created a test image with 4 black pixels on a cyan background and I took a screenshot from the simulator, see how the image is blurry, my original image has just 4 perfect black