I want to know if there's some kind of gesture for Windows Phone that allow me to tap on a Button and then drag to another and tap it, of course without XNA framework because this is not a game and I don't want use it.
For example, I have two buttons "A" and "B", if tap on A then I drag my finger (still on the screen) on B then B should be selected with A.
I hope everybody understand my problem, Of course I'm doing all this with C# and XAML for Windows Phone 8.
Thanks for the answers. Cheers.
You can use the DragStarted and DragCompleted events from Microsoft.Phone.Controls.GestureListener available in Phone Toolkit. Sample code: http://www.scottlogic.co.uk/blog/colin/2012/06/a-gesture-driven-windows-phone-todo-application-part-two-drag-re-ordering/
I also prefer using the already implemented gestures that Microsoft provides with the windpwsphone toolkit. It's probably the best implementation of standard gestures you can get.
And as #Arun already showed, there are already drag and drop implementations done.
But if this is not sufficient for you, you can always create your own gestures based on the raw event, that ever UIElement has. See:
http://msdn.microsoft.com/en-us/library/ms604577%28v=vs.95%29.aspx
Related
I want to implement a swipeable card (left and right swipe) in a Windows Phone app. Is there any built in control for making a card and moving it?
If there is no built in control for it then what is the best approach to build a card like below and animate the movement of it?
Note: I am not asking help about detecting and processing of the swipe gesture.
figure showing the card
How about trying Carousel control though its available for Windows 10 for windows phone 8.1 you can refrence these two tutorials
Tutorial 1
Tutorial 2
Carousel control is one good example of what you want to achieve.
Also , I think you can do such a thing by changing some Pivot & PivotItem styles.It could be more customized than Carousel control but you need to take more effort on that.
I am working on a windows phone app, in which I will need to add a costom "cover-flow" kind of control like how it looks like in the Spotify app below:
Note: user can swipe from right to left to change song.
I don't think Windows Phone SDK provide any controls support this, so I was wondering how such a thing is implemented.
I think it is either faked by a pivot page with dynamically adding/deleting pivot items, or maybe it is a custom control.
If I want to implement this as a custom control, does anyone has experience about it, or any sample code/tutorial will be very helpful.
Thank you
You're looking at a Panorama control. It is available out of the box with the Windows Phone SDK.
Telerik makes a great control that does just this. It's called the SlideView control. I know it's not free, but it is only $99. Given that it might take you about 4-10 hours to create this control yourself, I'd say it's worth it. If you join the Nokia Premium Developer Program you get Telerik's controls for free.
Note: I do not work for Nokia or Telerik and this is NOT a paid advertisement :)
The swipping effect is because of Panorama page. to change music you need to handle gestures that will be a tough task . The solution is to find a hack or have some control in the background that registers the touch event and changes the music
I was wondering If there was a way to have an xna game within a windows forms or in vice versa. I have found several examples online, but I couldn't understand what they were doing. I was also wondering if there was a way to make a sprite act like a button on a winforms...is it possible to click on a sprite?
Yes, on all.
Sprite act like a button on winforms:
use the onclick event
Xna Game within Windows Forms:
You would need to add a reference to the Xna.framework.something ... sorry kinda out of touch which class implements it but a lot of examples on the xna forums by the community
It should generate a toolbox control to be able to drag and drop.
Example: Nick Gravelyn's Tile Editor... it's youtube based which take you through it step by step.
Winforms into Xna Game:
I would say not to rely on adding a winform objects to xna games as it would not always work. e.g: running on xbox360 :D
Though, it would be same thing as above for the answer.
Examples: Winforms components into xna
I can't find out the best way to implement this gesture on ScatterViewItems. Also, I would like to use a wipe-gesture but that's further away ...
There are some support for Gestures in the Blake.NUI project. There's currently only support for Tap and Double tap (see the gesture page) but more could be added. In fact, I'm also in need of a Hold gesture but I haven't finished it yet.
I just noticed something weird in WM 6.5 emulators. Unlike 6.1 where finger panning kind of worked, the only way to scroll a Textbox appears to be through scrollbars.
This behaviour is in contrast to what they have done for comboboxes: they are now gesture-friendly without the programmer's intervention. I.e. the user can select a choice from a standard drop down menu by panning and scrolling. Previously, you had to use the embedded scrollbar. The combobox's case implies that MS took some measures to provide standard gesture support for classic finger gestures, yet I cannot see something similar for textboxes. This makes me ask the following:
Is there anything that can be done to make textboxes finger scrollabe easily?
Note that I refer to managed .NET CF development. It is my understanding that in native development I could use the new Gestures API to achieve the scrolling effect. Yet, I am not sure if there is an easier and more straightforward method that I have missed.
Create a textarea and limit it to two rows: one for text, one for a scrollbar.
You could try using the gesture api, there are managed wrappers for it...
http://blog.markarteaga.com/CategoryView,category,Samples.aspx