How to implement tap-and-hold context menus on WP7 - user-interface

The main UI on WP7 uses tap-and-hold everywhere to implement context menus.
I have a ListBox that uses DataTemplates for the items. I would like to have a behavior identical to the app list on the main UI. That is, when the user holds down on an item, a context menu appears nearby.
I have read posts here: http://social.msdn.microsoft.com/Forums/en/windowsphone7series/thread/e6d2a444-91d9-4d69-937e-689b24c36c09 that enumerate some hacky ways to implement this.
Has Microsoft released any specific guidance on how to achieve this effect?

The toolkit includes a ContextMenu for just this situation.
You can find an article on it's use at http://windowsphonegeek.com/articles/WP7-ContextMenu-in-depth--Part1-key-concepts-and-API

Related

How to create a Toolbar in Kendo Ui Web

I have some UI requirements that are best meet by a toolbar where options functions like radio button. That is, clicking one option, unclicks the other.
I've looked at using Mobil Button Group. I would prefer to have a solution that didn't use the Mobil controls.
Kendo UI Web doesn't include such a widget yet. This is part of our future plans.

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!

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.

How to add an application bar to a user control in wp7

I have built a wizard style user control that lets you add stackpanel based pages and flick between them.
I would like to add an application bar as part of the user control with next and previous buttons that enable/disable based on page displayed etc.
Application bar appears to be an attached property of PhoneApplicationPage. I have tried referencing Microsoft.Phone.Shell but get invalid type.
Any ideas how I can add it to my user control?
Application bar is such a pain in the a**. This control is not a Silverlight one but a native one. Maybe you can be more lucky with this solution:
http://blog.humann.info/post/2010/08/27/How-to-have-binding-on-the-ApplicationBar.aspx
The ApplicationBar is a service that is provided by the operating system, i.e. not part of the Framework, and can only be used at the page-level, not in your UserControl. In addition, the ApplicationBar does not support regular bindings as you've seen. As mentioned above there are a number of solutions that provide workarounds for this problem.
Alternatively, you could use the ApplicationBarButtonCommand and ApplicationBarButtonNavigation behaviors from the Silverlight Windows Phone Toolkit. It's a simple enough task to create your ApplicationBarMenuCommand if you need one.

Drop down menu like the default iPad application menus

I'm currently working on my first iOS application to run on the iPad, and I've come across a problem. I have been asked to implement menu's similar to the ones in the default applications such as when you click on the "Calendars" button in the top left of the calendars app.
Only issue is, I cant seem to find a standard UI object that looks like these, with the arrow connecting the menu to the button etc. Is this a standard UI component that I should be able to use, or will I have to imitate them by creating a custom object?
Thanks for any help.
That is a UIPopoverController. There isn't an Interface Builder control for this. You need to create one programmatically:
UIPopoverController *popover = [[UIPopoverController alloc]initWithContentViewController:someTableViewController];
See the documentation for more information and sample projects, specifically ToolbarSearch:

Resources