Years' ComboBox WP7 - windows-phone-7

I'm actually working on a Windows Phone 7 application that contains a few comboBox, in one of them "a years ComboBox".I want to insert a loop in that comboBox that should contain years from 1919 till the present year.How should i proceed?

I would take a look at the Silverlight Toolkit for Windows Phone. It contains a DatePicker bring up a looping/scrolling date/month/year selector, emulating the feel of the native applications. Since the source is available, you could use this as a starting point to create your own "year selector" from the components.

Check out this blog from Telerik on how to accomplish the looping effect. Essentially it is just a list with a virtualized data source.

Related

JumpList? Access to library

It is possible get access o library list and play songs in my app ? Not like this
if not... how to do this JumpList? I can't find good sample code, (this is ugly and doesn't work correctly).
his JumpList is a special ListBox? Am I right? How to relay which song was selected?
Ya earlier before August 2011, new Silverlight toolkit for WP7.1 mango it was a special ListBox with code logic to position the main list items.
But in Latest toolkit it is provided as a control, if you use
LongListSelector in your .xaml to show the list of items then it gives you a jumplist element as part of control.
For more information and sample on the LongListSelector refer this link.
you can download silverlight toolkit from here

Proper way to implement a dropdownbox in WP7 ?

I have seen 2 ways.
Fake a ASP.NET stlye and have the options appear over a textbox on the same screen.
When the box is touched open a new screen that lets you scroll through all options and pick one. When one is selected that value is copied to the placeholder on the orginal screen.
I am working on a project where we are doing #1 and I am thinking #2 is the proper way ?
Use ListPicker from the silverlight toolkit if you're looking to match the WP7 paradigm (which you should want to :) )
Silverlight Toolkit
These other stackoverflow questions may provide some insight (possible duplicate?):
How to get dropdown like menu in wp7?
Windows Phone Dropdown
Don't forget to use the search function at the top right hand before asking a question!

Adding control template to project

I want to use metro styled combobox item in windows phone 7 (mango). I ve found toturial to do this http://dotnet.dzone.com/articles/metro-style-combobox-windows but i don't know where should i put code of control template (it should work on every combobox on project).
Any ideas?
Chris
Is there any particular reason you want to use that ComboBox? The link you've posted is a hack to get it to work on Windows Phone. Have you taken a look at the ListPicker control from the Silverlight toolkit?
This article provides a great introduction on how to use it.

What's the control used in Kindle for Windows Phone 7

I was wondering what kind of control Amazon has used to display text in their application for Windows Phone 7 ? It must be some kind of custom ones because if I remember correctly there's not support for FlowDocument, Run etc in WP7.
<Run> is supported on WindowsPhone7 - e.g. http://social.msdn.microsoft.com/Forums/en-SG/wpf/thread/ca27556a-a33b-4d4e-82b4-a0ed8596d6a1 - you can see Run used in lots of apps - e.g. the official Twitter app.
This question - Programmatically determining max fit in textbox (WP7) - analyses the Kindle UI control a little bit - it leads me to think that Amazon are using a TextBlock control for the main page, and are doing some manual calculations to work out how many words are on the current page.
Kindle ebooks are primarily HTML (output of conversion from multiple formats), so it would be some kind of WebBrower control.
They haven't detailed this publicly.
I strongly suspect that they have their own controls to wrap a canvas which they dynamically populate with the text and then animate with their own manipulation code.

Autocomplete textbox in Windows Phone 7

I'm creating my first Windows Phone 7 application, and I'm struggling to find an autocomplete textbox. Is there an easy way to add one to the toolbox? Or do I need to create my own control?
The one from Silverlight 3's SDK, the AutoCompleteBox, works relatively well on the phone. It requires minimal styling changes to work.
There is a known issue today where selecting an item that pops up requires two taps: one to select and another to "really" select. We should have that issue in the platform (the bug is not in AutoCompleteBox) fixed by the time the phone development experience is ready.
AutoCompleteBox is in the Silverlight Tookit so you have to add a reference to that in your project.
After investigating it appears that there's not an auto-complete textbox control for windows phone 7 applications, so I've had to create one myself...

Resources