Proper way to implement a dropdownbox in WP7 ? - windows-phone-7

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!

Related

Xamarin.Forms - Choose list

I don't know what is the real name of what I want to do, but I would like to make a list similar as this website link (Standard Select part at the top), does anyone can help me? I know it's something easy but I can't find what I want to do it for Xamarin. Maybe I don't search in the right direction, I assume it too!
There's no 1-1 implementation of a dropdown control in Xamarin.Forms but you'll get very close by using the Picker control.
Please notice that the default Picker control doesn't support binding so you might want to look for an extended version with that support.
There is no such thing built in Xamarin.Forms. You can choose one of the controls described in documentation.
To implement what you are looking for you will have to use Custom Renderer with control like this from Android. Of course for iOS you will have to use something different because there is no such control on iOS platform, but you can use this.
Have you looked at the Syncfusion AutoComplete control?
I think this is the closest you will get to what you are looking for.
They also provide a free community licence for developers

Windows phone 7 Jump List control

I have a question. In a windows phone 7, Will i be able to navigate from the jumplist control to another page. For example i have some data in the jumplist control, and then once i click on one of the data, will i be able to go to another page from there? if it is possible, can someone show me some links for it? sample codes would be helpful
You can use the ListPicker from the Silverlight Toolkit and use the SelectionChanged event.
Tutorial : http://windowsphonegeek.com/articles/listpicker-for-wp7-in-depth
Download the project in this link an enhance by add selected index and page navigating option.
http://www.windowsphonegeek.com/news/developing-a-wp7-jump-list-control
http://www.telerik.com/community/forums/windows-phone/jumplist.aspx?pageid=1

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.

How to create a tab control where every tab item is connected with a different listbox

How can we create a tab control where every tab item is connected with a different listbox, so the view are different for every tab? I want to know what is the best solution for this, I tried two approaches:
All logic of tab activity is built in one class that is
mainPage.xaml.cs
For every tab I create a new class and call it when a tab event
fires
What is the best solution and if answer is second then what is procedure to add different view but the all the tab appear every time?
Or provide a link where I can get a full example of tab control usage in Windows Phone 7.
Windows Phone does not provide a TabControl implementation, however, it does provide the unique Pivot control, which provides the same level of functionality and is documented on MSDN. You might also find this post by Jeff Wilcox useful: http://www.jeff.wilcox.name/2010/08/looking-ahead-at-panorama-and-pivot/
Here is an article I wrote on how to use the TabControl in a Windows Phone Silverlight application. It does not really abide the current UI guidelines, but it works. All you need to do is use ListBox controls as proper child elements.

Windows Mobile Custom Textbox

I'm trying to replicate the input box shown in the image on windows mobile 5+
but i'm struggling for ideas!
So far the only things I have come up with (I haven't managed to make either work) were to either;
inherit TextBox and paint the textbox
background manually by overriding
OnPaint/OnPaintBackground
make the textbox background
transparent and position the
textbox over an image that looked
like the one in the screen shot
Has anybody done this or know of how this could be acheived?
Thanks in advance
OneShot
I gave up on this as I have moved away from windows mobile but found that it wasn't possible, due to restrictions in the compact framework, to do this with the existing textbox, you would need to create your own texbox control from scratch!

Resources