1. KarmaEcrivain94's Avatar
    Hi everyone,
    I have a big problem, and I need a solution. Pretty fast.
    Basically I have a TextBlock on my MainPage, but it's contents have to transfer to Page1 as soon as the user navigates there. How the hell can I do that in vb.net please? I thought of getting it to pass via an argument in the URI, but I have no idea how I could recuperate it once I'm on Page1...
    I've been looking for 40 minutes, and still can't find anything, so I've come here :/

    P.S. I'm a big newbie in the dev world, so I wouldn't refuse a little code alongside your explanations :P
    10-29-2014 04:50 PM
  2. KarmaEcrivain94's Avatar
    I found a way around this. Pretty dirty, really not Professional, but it works just fine :)
    Here is what I did:

    On MainPage.xaml.vb:
    Private Sub status_Tap(sender As Object, e As Input.GestureEventArgs) Handles StatusClick.Tap
    NavigationService.Navigate(New Uri("/Page1.xaml", UriKind.Relative))
    Dim objWriter As New System.IO.StreamWriter("Log.txt")
    End Sub

    On page1.xaml.vb
    Private Sub LayoutRoot_Loaded(sender As Object, e As RoutedEventArgs) Handles LayoutRoot.Loaded
    Dim srRead As New System.IO.StreamReader("Log.txt")
    Dim strFileText As String = ""
    strFileText = srRead.ReadToEnd
    TextBlock1.Text = strFileText
    End Sub
    10-30-2014 11:22 AM
  3. Ben Adams's Avatar
    A dirty approach would be to create some shared fields on the app.vb and stash state there and reference via the class
    11-22-2014 11:57 AM

Similar Threads

  1. Should I trade in my Lumia Icon for the HTC One M8????
    By mikeyyyownz in forum Windows Phones
    Replies: 23
    Last Post: 11-26-2014, 10:07 PM
  2. Not sure if anyone is interested in Evolve but here's a beta code..
    By Willy Soughers in forum Gaming Discussion
    Replies: 5
    Last Post: 10-30-2014, 04:38 PM
  3. Battlefield Hardline coming out on Xbox One in March 2015
    By WindowsCentral.com in forum Windows Central News Discussion & Contests
    Replies: 0
    Last Post: 10-29-2014, 04:42 PM
  4. FOX Sports app now available for Windows Phone, never miss a game
    By WindowsCentral.com in forum Windows Central News Discussion & Contests
    Replies: 0
    Last Post: 10-29-2014, 04:00 PM
  5. Windows Phone app for desktop - Syncing Music
    By poit57 in forum Windows Apps
    Replies: 0
    Last Post: 10-29-2014, 02:22 PM