windows-phone-7.1

Custom number picker?

冷暖自知 提交于 2019-12-10 22:40:37
问题 Is there an easy way to make a number picker for windows phone 7 that is similar to the timepicker control? I want go have custom ranges of 0-99 : 0-59 . 0-9. Google, bing, and msdn seem to be very vague with information on the subject. I found an article that describes exactly what I want to do here. Now my problem is that the article is old and if I type toolkit: in my XAML code, no suggestion comes up for a loopingselector. If I go into my toolbox, right click, choose items. There are no

how to properly install Json.net via nuget for windows phone 7.1 and Silverlight v.4,0

喜你入骨 提交于 2019-12-10 22:15:02
问题 I need to use json.net for json serialization and deserialization, but I have the problem with installing this package. As I saw on the website it supports wp 7.1 and silverilight. When I'm typing in console Install-Package Newtonsoft.Json Installing 'Newtonsoft.Json 6.0.1'. Successfully installed 'Newtonsoft.Json 6.0.1'. Adding 'Newtonsoft.Json 6.0.1' to Connected. Uninstalling 'Newtonsoft.Json 6.0.1'. Successfully uninstalled 'Newtonsoft.Json 6.0.1'. Install failed. Rolling back... Install

Is there any way to detect if there's a hardware keyboard on the phone?

。_饼干妹妹 提交于 2019-12-10 18:21:31
问题 I've seen other questions like Hardware Keyboard Event But not seen this for Mango... is there any way to find out if the phone has a hardware keyboard? 回答1: Use the DeviceStatus.IsKeyboardPresent Property DeviceStatus.IsKeyboardPresent Indicates whether the device contains a physical hardware keyboard. 来源: https://stackoverflow.com/questions/7595090/is-there-any-way-to-detect-if-theres-a-hardware-keyboard-on-the-phone

Windows Phone Application Bar's Icons colors

大兔子大兔子 提交于 2019-12-10 17:22:58
问题 When does exactly the color of appbar's icon changes (that is, from white to black, or drom black to white)? When the theme is switched from black to white, or when the background brush of Application Bar is changed? What I if I want to apply my own custom theme, so that the application bar is always white? I use black icons, but will they turn to white in Dark theme, even thouh the app bar is white (as it was customly changed)? 回答1: All the icons used in the ApplicationBar should be 48x48

MVVM and NavigationService

自作多情 提交于 2019-12-10 15:27:45
问题 One of the many benefits of implementing any pattern is to have a separation of concerns between the different layers in an application. In the case of Silverlight and MVVM it is my opinion that the NavigationService belongs to the UI. If the NavigationService belongs to the UI then it should be used in the XAML code behind, but the commands happens on the ViewModel. Should I raise an event on the Command in the ViewModel and let the View handle the event and call the Navigation? That sounds

Any way to access response body using WebClient when the server returns an error?

≡放荡痞女 提交于 2019-12-10 15:15:59
问题 Is there a way to access the response body when the response status is 4xx when using the WebClient class, for example: (webClient, evt) => // this is the event handler for the UploadStringCompleted event { if (evt.Error != null) { // can I access the response text? } }); 回答1: Since evt.Error is a WebException (rather than a vanilla Exception), here's what I do (please excuse the VB.NET): ''' <summary> ''' Extends a WebException to include any body text from the HTTP Response in the .Message

XAML Binding in binding

泪湿孤枕 提交于 2019-12-10 12:05:24
问题 I'd like to bind "MenuItemDescription" How? Text="{Binding Path=LocalizedRessources.MenuItemDescription, Source={StaticResource LocalizedStrings}}" In advance thank you edit: I'll try to be more explicit: I'd like to replace "MenuItemDescription" which is currently hard coded by a string dynamicly using a binding Sorry for my English, I use google translate to help me 回答1: I'm guessing you either want to bind to a string defined in a Windows resource file (.resx), or you want to use a value

how to store and use application wide object windows phone 7/8?

末鹿安然 提交于 2019-12-10 11:45:38
问题 I have an object which i am using almost all windows phone pages, currently i am using via PhoneApplicationService.Current.State["xx"] = m_xx; NavigationService.Navigate(new Uri("/abc.xaml", UriKind.Relative)); but this has to be done for all activities, which i don't want. is there a better way to save m_xx object which i can use in all the pages? what is the best practice? Can i make object static to some class and then use across pages via that class name? 回答1: You might want to look into

Thread sleep doesn't work well on Windows Phone 7

人走茶凉 提交于 2019-12-10 10:36:51
问题 I want to put my program to a sleep for a couple of seconds. When I use thread.sleep(x) entire program doesn't respond. According to this article -> http://msdn.microsoft.com/en-us/library/hh184840(v=VS.92).aspx application which is not responsible for 3 seconds doesn't pass the certification :/ (I have to wait 5 seconds). 回答1: You need to rethink what you are trying to do with your pause. It's a bit hard to say given that we don't have much info about what you try to achieve with this pause,

The column name is not valid. [ Node name (if any) = t0,Column name = version ]

给你一囗甜甜゛ 提交于 2019-12-10 03:03:59
问题 I am facing issue while trying to query SQLCE database in my Windows Phone Mango application. I get exception when I execute foreach (var item in myDataContext.MyTable.Select(item => item)) The column name is not valid. [ Node name (if any) = t0,Column name = version ] Strangely, when I execute query based on any individual column, it works fine foreach (var item in myDataContext.MyTable.Select(item => item.SomeColumn)) Any idea what could be wrong here? 回答1: I installed LINQ to SQL Debug