Tap and Hold (Long Press) - windows-phone-7

Has anyone implemented Tap & Hold in a Windows Phone 7 App yet? I can see a couple of possible approaches KeyDown/KeyUp and a timer or ManipulationStarted/manipulationCompleted and a timer.
However it strikes me that this is a less than idea approach because different apps would have different timer settings leading to inconsistency.
Am I missing something? I was hoping for a TapAndHold event

For all views Hold method is there.
It will handle long press function.

Silverlight Toolkit for Windows Phone adds easy to use gestures support, including On Hold gestures

I'm in the same situation, and I'm looking for "the recommended way". In the meantime, Mike Francis posted a solution on his blog, using Microsoft.Xna.Framework.Input.TouchPanel's gesture recognition within a Silverlight app. I didn't try it.

Start the Timer on Hold Event of GestureLister
and stop it on GestureCompleted event this is really a trick see detail answer on following link
How do I detect when toolkit:GestureListener Hold has stopped?

Button b = new Button();
b.Hold += new EventHandler<System.Windows.Input.GestureEventArgs>(HoldEventHandler);
The above code should work for touch and hold event

Related

Tap actions on Android wear watchfaces

So, I know this is undocumented and unsupported and not recommended etc.
But, I haven't given up on trying to add a button to an Android watchface. If you are familiar with WatchMaker, you know they support this feature!
My guess is that is has something to do with implementing onCommand on the engine, but I have encountered 2 problems with this method:
For some reason the X and Y are always 0 there
I don't know how to disable the default tap action that takes you to the menu.
Anyways, if someone can guess or know how WatchMaker are doing this, please suggest a solution!
You can find an example here
In fact, these WatchFaces add views in the WindowManager that have an onClickListener when visible.

How can I detect 2 button pressed at the same time?

I have a winphone app with several buttons on a page. I want to be able to press them two (or more) at a time. Unfortunately when I press two buttons (with 2 fingers), only one of them gets the click or tap events and the other one does not. How can I know that 2 buttons are pressed?
According to the post below, you could achieve this by using Touch.FrameReported event.
Pressing multiple buttons simultaneously
What underlying framework are you using ? Is it C++ or C# ? XNA or WPF/XAML ? WP7 or WP8?
As Kulasangar pointed Touch.FrameReported should be the way to do it in C#.
For XNA you will have to enable the MultiTouch and then use the TouchCollection class. That will give you access to multiple touches.
In DirectX you might have to use managed C++ and listen to one of the system events.
Things might change based on the platform ( WP7 or WP8 )

How to trigger the On-Screen-Keyboard in Windows 7 by clicking on an input?

Well, I'd like to show up the On-Screen-Keyboard when the user clicks onto any control which needs a text-input. System-wide.
The reason: I am using a touchscreen for some projects I've been working on and needed to open the On-Screen-Keyboard manually every time me or someone else had to type something.
Are there any possibilities, capturing a system-wide event for that? Thanks in advance for your help and suggestions!
I am currently looking into a solution like this. It's been a feature well implemented on mobile platforms, but nothing on the desktop! Hopefully something will come along as a result of the Touch Centric strategy for Windows 8.
The closest, but most expensive thing I found is M T Soft TS Keyboard http://www.imgpresents.com/mtsts/mtsts.htm?babelfish=translate

can anyone show me how and How they have 5 button on the title bar instead of 3 max, resize, close in Windows?

mostly in all article i found that everyone show that their OS give them 5 button. can anyone explain how
http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs
in this article every window's title bar have 5 button on top whenever i can see only three button in my windows [close, restore ,maximize].
can anyone show me reason behind it.
They're running UltraMon, which is a utility that provides enhancements for multiple monitor support.
In particular, it adds extra window management buttons to the title bars of all applications, which make it easy to move windows from screen to screen.
You can download a free evaluation version from the vendor, but the full version will cost you $39.95 US.
He has multiple screens on his computer, those buttons mean move to next screen.
Extra buttons in the titlebar come from utility applications that hook into every process.
Take a look at this tutorial for a basic example, you also need to register a hook with SetWindowsHookEx (WH_CBT or WH_SHELL)
For Windows Vista and 7, Microsoft has provided detailed guidance in the article Custom Window Frame Using DWM.
Copied from my answer here.

How to create custom onscreen keyboards?

Im about to start creating a custom onscreen keyboard for my WP7 app. An out of the box SIP will not work since they can't be customized or built from scratch with .NET.
Ideally the keyboard would activate like a SIP. Specifically, appear when the textbox receives focus. Docking to the bottom of the screen would be nice, too.
Any ideas where I could find samples of this?
Also, do you have any recommendations or lessons learned you could share?
I think you'll be making this sample ;)
The challenge with letting textbox take focus is likely going to be the built in SIP is going to appear. ReadOnly is an option, but you'll either lose or need to find a way to retain/mimic the cursor if that visual queue is important to you.

Resources