windows-8

Change the Foreground color of a TextBlock inside a ListView's DataTemplate when the item is selected

情到浓时终转凉″ 提交于 2019-12-12 10:26:34
问题 I'm building a Windows Store app with C#/XAML. I have a simple ListView bound to an ItemsSource. There's a DataTemplate which defines the structure of each item and that has a ContentControl and a TextBlock in it. I wish to change the Foreground colour of the TextBlock when the item is selected. Does anyone know how I can do this? <ListView Grid.Column="1" ItemsSource="{Binding Categories}" ItemContainerStyle="{StaticResource CategoryListViewItemStyle}" Background="{StaticResource

PCLStorage in Windows Phone 8

为君一笑 提交于 2019-12-12 10:12:46
问题 I'm using PCLStorage for a Win8/Wp8 project I'm working on. I'm using it within a PCL itself, and have it referenced in my Win8, Wp8 and PCL projects. Everything is working great in Win8. In Wp8 however, once I hit my PCL for storage which uses PCLStorage, I'm getting a NotImpmlementedException when I call FileSystem.Current; "This functionality is not implemented in the portable version of this assembly. You should reference the PCLStorage NuGet package from your main application project in

MediaCapture Windows 8 Desktop - Photo is Dark

回眸只為那壹抹淺笑 提交于 2019-12-12 10:09:11
问题 I am attempting to use the MediaCapture API within a Windows 8 Desktop Application (WinForms .NET 4.5). I am able to take the photo using the API, but the photo comes out very dark. Also, it does not appear that the MediaCapture API is triggering the camera flash automatically as it should. I have tried to set the Brightness, Contracts, WhiteBalance and exposure to automatic per MSDN documentation. Here is the relevant code. _mediaCapture = new MediaCapture(); // init the settings of the

Displaying a picture stored in Storage file in a metroapp

孤人 提交于 2019-12-12 09:52:47
问题 I would like to display the content of a picture stored in a StorageFile through a binding, but whatever I'm trying to do it doesn't seem to work. Here are the two solutions I have already tested : string img =( await CompetencesFolder.GetFileAsync(FormatImageNameToFileName(imageName))).Path; And then returning the path obtained (a full absolute path to the file) to the source Property through binding, and : BitmapImage img = await LoadImage(await CompetencesFolder.GetFileAsync

How to enumerate through Colors in WinRT?

て烟熏妆下的殇ゞ 提交于 2019-12-12 09:45:43
问题 Enumerating through colors in non-WinRT is a common question with a simple answer. But, since the Colors 'ENUM' is actually just a class with static 'color' properties you can't use the standard approach in WinRT. How do you enumerate colors in WinRT? 回答1: Like this: Enumerating through Colors in WinRT requires using System.Reflection so you can fetch the static properties sub-classed in the container class 'Colors'. Like this: Dictionary<string, Windows.UI.Color> Colors() { var _Colors =

Is there any MasterPage in windows8 development

点点圈 提交于 2019-12-12 09:18:20
问题 I have some pages in the win8 application, most of which have a similar layout, I use Frame.Navigate to switch the pages. Just wonder if there is something like MasterPage in asp.net webform/mvc. 回答1: Just create a page with the layout you want and then use templates to customize it for particular views. You could have one main view .xaml file and then create a resource dictionary file (for separation purposes) for each different way you use it. Edit: I found someone who made a "Master Page"

Can WinRT application use obfuscation?

天涯浪子 提交于 2019-12-12 08:47:51
问题 All Metro applications must be inspected before distribution through Windows 8 AppStore. Does this mean it will not be allowed to use code obfuscation? Or it is still possible, and only some specific aspects are going to be monitored during such inspection? 回答1: Here are some facts: Marketplace for WP7 allows C# apps be obfuscated (even MS he advises doing so) and I don't see any reason why Windows AppStore would ban such apps. It is almost certain that some vendors will provide compatible C+

Upgrading database on app update

风流意气都作罢 提交于 2019-12-12 08:16:59
问题 I am developing a Windows Store App that uses SQLite for Windows Runtime Extension and sqlite-net library to store data in a local SQLite database. This database is created in Windows.Storage.ApplicationData.Current.LocalFolder.Path path. Everything works like it should and I guess I will not have problems when submiting. Question 1 But what will happen when I change the app, submit again and the user updates it? Will database file be deleted? Will the user lost his data? Question 2 Will I be

Closing the Windows 8 Charm Bar

♀尐吖头ヾ 提交于 2019-12-12 08:13:37
问题 I have a Surface Pro that I need to "lock down" as a type of Kiosk mode. I am aware that an update is on its way for "Kiosk Mode".. however I need to do this before that. I have searched all over the internet, but it appears that you cannot disable the Charm bar from a swipe on the screen . I have found ways to disable trackpads.. but unfortunately, since this tablet will be used without a keyboard, I need to disable the Charm bar. My new thought is to move the entire Charm bar HWND thousands

Choosing between XAML's ListView and GridView in WinRT

喜你入骨 提交于 2019-12-12 07:39:44
问题 The GridView and the ListView in XAML seem to be the same control. How does a developer choose between the two? 回答1: The GridView control typically scrolls horizontally. Also, you will see some native spacing between items that is greater than that in the ListView. This spacing is there because of the intent for how the controls will be used in Windows Store apps. (read on) Like the ListView it inherits from ItemsControl. Like the ListView groups using GroupStyle. Like the ListView it