I am developing windows phone app. I want to create drop down list for names of states in India.
How to create drop down list in windows phone ?
Source click
ListPicker control in the Windows Phone Toolkit, which provides many additional controls and pieces of functionality for Windows Phone development. It's not native to Visual Studio, but it's easy to install and use in apps. For a detailed tutorial on how to install it, I recommend you read this post
The ListPicker control has two modes of display: expansion mode and full-screen mode. By default, if there are five or fewer items in the ListPicker, the data will display in expansion mode, which most resembles a dropdown. If there are more than five items, the data will display in its own screen.
The XAML for adding a ListPicker is quite simple. If you want to hard-code your values in the ListPicker (and you have fewer than six items), your code will look something like this:
This works great if your options aren't likely to change. However, if you need to programmatically add values to the ListPicker, you'll add this code to your MainPage.xaml.cs file:
Alternatively, if the ListPicker values will be populated from a datasource, you have this option:
In all of these examples, since the number of items is fewer than six, the ListPicker will expand in place:
Related
I'm just beginning to build a Universal Windows Platform (UWP) C++ app using VS2015. I've worked in Android before and in .NET, but not UWP (and before you suggest using .NET, I'm using this as a project to get more C++ experience). I'm trying to add a screen to the app that will basically have a table with data that can be sorted by clicking on the corresponding column (one click for ascending, another to reverse. Click a different column header to sort by it instead).
Searching for help on this is a mass of craziness however. Half of the results recommend gridview but when I try to implement them parts of gridview turn out to be unavailable in the UWP platform and I can't seem to make it clickable. Others recommend listview but I want to have multiple columns that get sorted together on clicking of one, and keeping them in sync seems like it could get complicated. There are a variety of other options but I'm getting lost in the mix, particularly when some are then unavailable for UWP and MSFT seems to often have out of date documentation.
I'm also new to this XAML/binding approach and a bit lost with it. With an Android app version of this application I had an sqlite database from which I pulled a table that could be displayed to the screen. I was planning on a similar approach here but in that case what do I bind to? Do I query the database, build a table in memory, and then bind to that? That seems clunky and problematic if columns have different data types. And if gridview doesn't work, in what do I then display it?
That's a kind of vague and wide question I know, but this seems to be one of those instances where further research makes me more lost rather than bringing clarity so after a few hours of searching I thought I'd just ask for advice. This seems like it should be such a simple task that I must be doing something wrong. Any recommendations you have are most welcome!
There is no Control as you said in UWP.
Also it seems the data grid control to display data in a table is that you want. Please refer the DataGrid in this link: https://github.com/MyToolkit/MyToolkit/wiki/DataGrid. When we click the corresponding column the column can be changed.
We should be able to bind the date to the ItemsSource of the DataGrid and set the head name to DataGridTextColumn.
There is a sample for it, you should be able to see it in https://github.com/MyToolkit/MyToolkit/tree/master/src/SampleUwpApp.
Am developing windows mobile app in 8.1. Looking for a control like List view carousel.
Only one item needs to be shown at a time. User needs to swipe to go next / previous item. Order will be highlighted in below dots
Use a flipview. Check this for more info https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh781233.aspx
You could create a control containing a Pivot with custom template for Image, header textblocks and other things you want and a LitView, also with custom template for showing which item is selected. It will need to change selected index according to pivot changes.
As Sjon wrote, nobody will code it for you so after my hints I think you should manage to build it.
I need to create an app that has a few setttings that need to be set before the application can continue i would like to do that using some sort of wizard. I looked at other apps and found that the 'Kid's corner' app does exactly what i want.
My question is is that a default control or is it a custom control. If it's a custom control how would one create one.
There is no specific template to accomplish this task. The most common way to do it would be to create a separate page for the wizard. On the page you'll use various controls to actually create a settings page. Most likely these will include Textblock (for static text), TextBox (for text entry), and ToggleSwitch for binary (e.g. On/Off) options. Here's an example of what you could use to create a very simple welcome wizard that allows the user to turn live tiles on or off.
<TextBlock Text="Welcome to the app!">
<ToggleSwitch x:Name="toggleSwitch1" Header="Turn on live tiles?"
OnContent="On" OffContent="Off"
Toggled="ToggleSwitch_Toggled"/>
If you need more info please ask :)
Reference for ToggleSwitch: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868198.aspx
I have to do a Windows Store application in XAML and C#, and the "Grid app" template is almost exactly what I need...
The problem is that this template displays same items, divided in groups.
For my app, I would like to do exactly the same thing but for different type of items instead and have a different details page for each type of item...
This is my first app and I don't manage to do it... How can I do it easily ?
The new "Hub" control of Windows 8.1 would be really perfect, But I can't work with Visual studio 2013 and Windows 8.1... :
http://mikaelkoskinen.net/winrt-xaml-hub-control-getting-started-tutorial-semanticzoom/
Thanks
I finally found the solution.
I had to use a TemplateSelector :
http://channel9.msdn.com/Series/Migrating-apps-from-Windows-Phone-to-Windows-8/Custom-Styling-in-Windows-Store-Apps
I am trying to convert some of my old applications into new Windows Store App design. Some of these applications use Tabs to represent multiple functionalities of the applications. For example, I have a simple English-German dictionary with two main functionality:
Translate English to German
Translate German to English
each represented in a separated Tab.
I have looked around various applications in Metro style and found no equivalent to Tabs.
It is possible to create Tabs manually (using buttons and ...) but they probably had a reason for not including such thing in default elements.
What's the proper way to design such concept in Metro?
You could implement "tabs" in two ways:
Use the top app bar, like Internet Explorer
Provide on-screen buttons in the header of the app (and style them to look like Pivot items in Windows Phone 7)
However, I believe that tabs should be used for independent activities. In your case, most users would want to easily swap from one translation to another. So, I recommend that you implement an interface similar to http://www.bing.com/translator/ or http://translate.google.com/
You could look into using the FlipView control. A typical example showing where this is used is the control used for navigating screenshots in the Windows Store. You can make use of buttons (or whichever control you choose) to change and track the currently displayed item in the flipview.
Reference: http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.flipview