Windows Phone Dropdown

I see that there is no / combobox dropdown in the windows toolbar. I see that there must be a way to create it, because in the phone settings, choosing a theme is essentially a drop-down menu.

Does anyone know where I can get sample code, how to create one? I saw several patterns, but haml seems very long and complex. Is it really hard to create this control?

+6
source share
2 answers

You can use Silverlight for the Windows Phone Toolkit (you really should use this). The ListPicker control will do what you want.

Here is an in-depth guide to using it: http://www.windowsphonegeek.com/articles/listpicker-for-wp7-in-depth

Here is a description of this (from here ):

Listpicker

The combo box is simply not cool in WP7 deviation. Therefore use ListPicker. Two formats are available. The first is expanding to give you options. Useful for short listings. The second takes you to another page using the full list of choices returned to the call screen. You can see it in use on WP7 when changing Settings / Ringtones and sounds.

+11
source

Choosing a theme actually creates a new page, and when you select a color, it goes to the previous page with this value.

Here is how I do it:

private void modelListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { //if SelectedIndex == -1, do nothing if(modelListBox.SelectedIndex == -1) return; //navigate to the MainPage NavigationService.Navigate(new Uri (String.Format("/views/MainPage.xaml?MakeIndex={0}&ModelIndex={1}", m_nCameraDataIndex, modelListBox.SelectedIndex), UriKind.Relative)); //reset SelectedIndex modelListBox.SelectedIndex = -1; } //end method modelListBox_SelectionChanged 

For ddlist, I found this:

http://www.simego.com/Blog/2008/05/combobox-dropdo

0
source

Source: https://habr.com/ru/post/885854/


All Articles