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 )
Related
I am using Xamarin forms DisplayAlert. I have two buttons in it one is light blue and another is Darker blue. I guess it is focus effect causing the difference.
can I set focus as per requirement? I tried to search documentation but no luck.
DisplayAlert("Caption", "Message", "Cancel", "Send");
Cancel and send are buttons on display alert. Default focus on Cancel.I want to switch focus to Send without changing position of buttons.
I am pretty sure that Xamarin doesn't (and will not) support providing focus to a specific button using a DisplayAlert since this feature exists in iOS only. Remember that Xamarin.Forms is meant to target all platforms, and not iOS only, and introducing a "focus" variable for a single platform would thus be a no-go.
What you can do, is to swap your two buttons around as you mentioned yourself.
If that is not an option, have a look at what you can achieve using third party libraries such as Acr.UserDialogs.
If that doesn't help you either, you will probably need to write a Custom Control or use an ActionSheet instead.
Good luck.
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!
I'm seeing very spotty/unresponsive behavior with the silverlight map control on Windows Phone 7 (Microsoft.Phone.Controls.Map). The map control doesn't seem to pick up a lot of my pinch gestures. Is anyone else seeing this? Is there a way a workaround?
Just as an experiment I hooked up custom gesture listeners to PinchStarted, PinchDelta and PinchCompleted. My event handlers are getting fired every time I pinch, but the Silverlight map control doesn't pick them "most" of the times.
PS. I'm using the most up to date SDK/Toolkits.
After talking to our Microsoft contact we have no answers for the pinch performance problems. The official side stepped our question but and recommend putting a +/- buttons on the map for zooming in and out of the Map. To show the +/- buttons use the ZoomBarVisible property.
Is there a way to display a browser control over the top of an XNA game on Windows Phone 7?
Basically I need to display some HTML, and then allow the user to return to the game.
So it can be full-screen if need be. It could even involve switching to Internet Explorer, if there's a way to return to the game from IE?
Is this possible?
It was announced that XNA and Silverlight would be available together in the same app starting with Mango update.
That might allow you to get what you're after.
I am not certain It would be nice if we could pop an html screen like we do on the iPhone. I know if you embed an url you can open ie. but as far as I know you can only get back to your game via the hardware back button.
You are not able to directly display HTML content in your XNA application due to the differences in the UI core. You are able, however, to invoke the WebBrowserTask. All you need to do is add a reference to Microsoft.Phone and then add a using statement for Microsoft.Phone.Tasks.
Is there some toolkit for the animation when a user clicks on a list box item? The animation that I am referring to is when you tap on a list box item (like an email in your inbox) and the text depresses under your finger (or topple? its kind of hard to describe). I see this in many Windows Phone 7 applications like Yelp, OneBusAway, GoVoice, etc and was wondering if there was some toolkit for this animation or if I have to develop this animation on my own.
If anyone know if such a toolkit exists or not please let me know! I could do this using storyboards but I don't want to reinvent the wheel unless I have to :).
Thanks!
Haji
This would be Tilt Effect. Detailed here.
Tilt Effect Overview for Windows Phone
The Silverlight Toolkit has this functionality built in.
http://silverlight.codeplex.com/