windows-8

Change background color of selected item in listbox

可紊 提交于 2019-12-19 10:16:13
问题 First I search here and on web and I find many and many solution how change background color of selected item in listbox in WPF but not how do it in windows store app. This framework is litte different I cant get to work any solution. I use this: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/91575930-2058-413a-99de-f3b31c74dfd9/change-itemtemplate-forground-when-listbox-is-focused?forum=winappswithcsharp on the end of page is very good solution but he set item teplate like this:

does windows 8 store apps support Ms Access database?

百般思念 提交于 2019-12-19 09:45:34
问题 I have just started leaning windows 8 store app programming and came around a question that does windows 8 store apps support Ms Access database ? If not then which all database does it support. thanks 回答1: Depends on your definition of support, you could create a WCF service that allows you to access your data from MS Access, see the link below for how to access WCF Services in a Windows store app. Accessing WCF Services with a Windows Store Client App But if you don't want to be tied to MS

Load bitmapImage from base64String

天涯浪子 提交于 2019-12-19 09:27:27
问题 How can I load a bitmapImage from base64String in windows 8 ? I tried this but I am not successful. It used to work on windows phone. What is different? Looks like I have to use the function setsourceasync. When I use that, then I am required to pass the parameter as IRandomMemory which I am unable to do. How to do this? public static BitmapImage Base64ToImage(string base64String) { var bitmapImage = new BitmapImage(); try { if (!String.IsNullOrEmpty(base64String)) { var imageBytes = Convert

No metro project templates in Visual Studio Express 2012 for Desktop?

試著忘記壹切 提交于 2019-12-19 08:54:17
问题 Both of the download pages for for Desktop and for Windows 8 provide the same web installer called: "Visual Studio Express 2012 for Windows Desktop". I installed it and here is its "New Project" window: In this tutorial page, it says I should have templates like this: (source: microsoft.com) How can I get these templates? I'm using Windows 8 x64 RTM. 回答1: You have most likely downloaded wrong Visual Studio Express version, maybe there is broken link on that page. If you want to develop Metro

No metro project templates in Visual Studio Express 2012 for Desktop?

霸气de小男生 提交于 2019-12-19 08:53:16
问题 Both of the download pages for for Desktop and for Windows 8 provide the same web installer called: "Visual Studio Express 2012 for Windows Desktop". I installed it and here is its "New Project" window: In this tutorial page, it says I should have templates like this: (source: microsoft.com) How can I get these templates? I'm using Windows 8 x64 RTM. 回答1: You have most likely downloaded wrong Visual Studio Express version, maybe there is broken link on that page. If you want to develop Metro

Does local storage get deleted when a user updates my app?

删除回忆录丶 提交于 2019-12-19 08:11:08
问题 I have a windows 8 app (Digital Nightstand) in the windows 8 appstore. The app stores user preferences in XML files on the user's machine, also known as local storage. What I want to know is that if I release an update for my app and the users take the update, will the existing stored settings be wiped out? 回答1: The answer is no! Don't worry when user updates an app, the local and roaming folders/settings won't get wiped out. 回答2: The data does not get deleted. But if you release an update

How to close Message Dialog programmatically

a 夏天 提交于 2019-12-19 08:01:22
问题 I am trying to close a MessageDialog in my WinRT App. I have noticed if I attempt to show two message dialogs at once, I get an UnauthorizedAccessException. To avoid this, I want to close the existing message dialog if it is open. I use this to show the dialog: MessageDialog md = new MessageDialog(" "); private void MessageBox(string s) { Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { md.Content = s; //CLOSE HERE md.ShowAsync(); } ); } How do I close it? 回答1: instead of trying to

Using Async CTP with Portable Class Library

被刻印的时光 ゝ 提交于 2019-12-19 07:23:51
问题 I am trying to rewrite a project into a Portable Class Library. But the problem is that it is using Async CTP, and I can't compile it as a library for WP and Windows Store App. If I don't include reference AsyncCtpLibrary.dll, compiler says that The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) If i include it, compiler still says the same errors and adds a warning: The primary reference "AsyncCtpLibrary" could not

Windows 8 - Animating custom property in code-behind

穿精又带淫゛_ 提交于 2019-12-19 06:19:09
问题 Basically, I want to make bunch of Shapes and make them animated. So I came up with following custom class: public class FunkyShape : DependencyObject { public double Animator { get { return (double)GetValue(AnimatorProperty); } set { SetValue(AnimatorProperty, value); } } public static readonly DependencyProperty AnimatorProperty = DependencyProperty.Register("Animator", typeof(double), typeof(FunkyShape), new PropertyMetadata(0, new PropertyChangedCallback(Animator_Changed))); private

Unit Testing Windows 8 Store App UI (Xaml Controls)

时光总嘲笑我的痴心妄想 提交于 2019-12-19 06:03:12
问题 I've been creating a Windows Store App but I have thread problems testing a method which creates a Grid (Which is a XAML Control). I've tried to test using NUnit and MSTest. The test method is: [TestMethod] public void CreateThumbnail_EmptyLayout_ReturnsEmptyGrid() { Layout l = new Layout(); ThumbnailCreator creator = new ThumbnailCreator(); Grid grid = creator.CreateThumbnail(l, 192, 120); int count = grid.Children.Count; Assert.AreEqual(count, 0); } And the creator.CreateThumbnail (The