microsoft-metro

Metro app: ListView ItemTemplate DataTemplate for selected item

别来无恙 提交于 2020-01-06 07:45:10
问题 I created a SplitPage view from canned templates that has the following ListView definition: <!-- Vertical scrolling item list --> <ListView x:Name="itemListView" AutomationProperties.AutomationId="ItemsListView" AutomationProperties.Name="Items" TabIndex="1" Grid.Row="1" Margin="-10,-10,0,0" Padding="120,0,0,60" ItemsSource="{Binding Source={StaticResource itemsViewSource}}" IsSwipeEnabled="False" SelectionChanged="ItemListView_SelectionChanged" ItemTemplate="{StaticResource

How save photo capture windows 8 c# metro app?

时间秒杀一切 提交于 2020-01-05 07:49:46
问题 I looked everywhere but can't find how save my photo after I captured it. I use windows 8 media capture, and after I capture it, I show it on my page. But don't know how to save it to a particular place. This is how I take the photo, pretty classic: private async void Camera_Clicked(object sender, TappedRoutedEventArgs e) { TurnOffPanels(); CameraCaptureUI camera = new CameraCaptureUI(); camera.PhotoSettings.CroppedAspectRatio = new Size(16, 9); StorageFile photo = await camera

How save photo capture windows 8 c# metro app?

自古美人都是妖i 提交于 2020-01-05 07:49:13
问题 I looked everywhere but can't find how save my photo after I captured it. I use windows 8 media capture, and after I capture it, I show it on my page. But don't know how to save it to a particular place. This is how I take the photo, pretty classic: private async void Camera_Clicked(object sender, TappedRoutedEventArgs e) { TurnOffPanels(); CameraCaptureUI camera = new CameraCaptureUI(); camera.PhotoSettings.CroppedAspectRatio = new Size(16, 9); StorageFile photo = await camera

Display an Animated GIF in a Metro App

試著忘記壹切 提交于 2020-01-05 07:17:13
问题 Is there a control to show an animated gif in a Windows Store (Metro) app in Windows 8? I am using C# and XAML with databinding. 回答1: The Image control doesn't support animated GIFs. You will need to extract the frames and animate them on your own timer. You should take a look at this link which might help you regarding your question: http://advertboy.wordpress.com/2012/05/08/animated-gifs-in-xamlc/ 回答2: You cannot display an animated gif in a grid. However, you can display an animated gift

Windows 8 C#: Windows.Ui.Xaml.Media.ImageSource change Image

元气小坏坏 提交于 2020-01-05 05:26:31
问题 WARNING There are two different ImageSource s in Windows API System.Windows.Media.ImageSource = The one of Windows Forms Windows.Ui.Xaml.Media.ImageSource = The one of Windows Store Apps I'm a beginner in C# and Windows 8 Metro Style App programming stuff. But if you want to edit the image of a Image , the "old" method with BitmapImage won't work: XAML: <Image Source="http://image.source.de" x:Name="Image1" /> Code-Behind C#: Image1.Source = new BitmapImage... won't work. The compiler will

Can a metro app open the default browser without opening a page?

戏子无情 提交于 2020-01-05 04:57:50
问题 On button click I want to open the default metro browser (usually IE) without opening a new tab/page, just open the browser, If it is already running then just switch to it as it is to it's current state. Is there a way to do that? 回答1: This is just something to try, and may or may not work in your scenario: If you know the url that is open in the browser, your Windows Store app could launch that same url with the launcher. In my app, when I launch the same url multiple times, IE will pop up

(C#) Azure - Null Reference Exception during Live Authentication

≡放荡痞女 提交于 2020-01-04 13:47:04
问题 I followed the Live Authentication tutorial on the Azure Mobile Services page (http://www.windowsazure.com/en-us/develop/mobile/tutorials/single-sign-on-windows-8-dotnet/) and when I run this line of code LiveLoginResult result = await liveIDClient.LoginAsync(new[] { "wl.basic" }); I get a "NullReferenceException" no matter what I do. I tried changing "wl.basic" to "wl.signin" and that didn't work either. I am signed into my Microsoft Account, I get the pop-up to allow it to login, the app is

Saving a BitmapImage object as a file in local storage in windows 8?

橙三吉。 提交于 2020-01-04 06:49:11
问题 I have a BitmapImage object, which already has its source etc set. I simply want to save it to my apps local storage folder, so that I can reference it at other points in the program. I just cannot figure out how to get it from object to file though! I've found solutions to similar problems for WP7, but its just not the same. Ive got as far as creating my image from a Base64 string (which works as I can load the image into a UI image viewer and see it) and have called it img , and I know I

Can I use objects created in C# within metro ui javascript code?

穿精又带淫゛_ 提交于 2020-01-04 06:23:49
问题 I really like C# and I am familiar with it, but I also want to use HTML5/JavaScript to manage the UI for my Windows 8 Metro app. So, how can I import and use objects from a library made in C# in the Javascript files? Example here is the starting JS code for an empty HTML5/JS project... // For an introduction to the Blank template, see the following documentation: // http://go.microsoft.com/fwlink/?LinkId=232509 (function () { "use strict"; var app = WinJS.Application; app.onactivated =

RSA Encryption in metro style Application

早过忘川 提交于 2020-01-03 18:51:14
问题 I have public key modulus and public key exponent and I need to generate a public key and encrypt data in metro style application. in c# we have RSAParameters class but I cannot find any thing of such sort for metro style applications. when I use the base64encoded public key directly received from the certificate and try to import the key with the below code I get an exception thrown ASN1 bad tag value met. which i think is due to the invalid format of the data. //sample dummy key from