none
Shake to navigate to another page RRS feed

  • Question

  • How can I get my phone to navigate to another page when I shake it? Moreover does the code need to be added to every single page?
    Monday, June 10, 2013 12:45 PM

Answers

All replies

  • You can detect the shake gesture and then simply call NavigationService.NavigateTo to navigate to the specific page. Will that always be the same page or will it depend on the actual page, that is up to you.

    As for the latter question, you add shake gesture globally i.e. only once.

    Also, think if you really want to add this. Shaking the phone is rarely intuitive way to navigate away or to some page.

    You will also need to find ShakeGestures.dll somewhere if you want to use the gesture.


    Toni Petrina
    My blog: Toni codes .NET
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful"


    Monday, June 10, 2013 1:31 PM
  • I know how to call the NavigationService but how do import the shake gesture? Is there a page explaining about this?
    Monday, June 10, 2013 1:36 PM
  • Not really, but if you search around, you might find some links like this: http://blogs.windows.com/windows_phone/b/wpdev/archive/2011/02/22/windows-phone-shake-gestures-library.aspx.

    Toni Petrina
    My blog: Toni codes .NET
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful"

    • Marked as answer by m.findlay93 Monday, June 10, 2013 2:10 PM
    Monday, June 10, 2013 1:40 PM
  • OK thank you Toni. Out of interest do you know anything about the PDF issue. I'm trying to display a PDF file within my WP7 app but many are paid and some I've been told of seriously lack documentation as to how to implement it. Please don't say component one because that is paid.
    Monday, June 10, 2013 2:12 PM
  • As far as I know, there aren't any open source libraries for WP7 that can display a PDF file. However, there are some for WP8 IIRC.

    Sorry, tough luck :/


    Toni Petrina
    My blog: Toni codes .NET
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful"

    Monday, June 10, 2013 2:13 PM
  • OK then. Well in that case could you please tell me the name of some please?
    Monday, June 10, 2013 7:00 PM
  • I don't know any from the top of my head. Search around.

    Toni Petrina
    My blog: Toni codes .NET
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful"

    Monday, June 10, 2013 9:30 PM