Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

Windows Phone Development navigate to another page

Hi all,
I'm trying to simply navigate to another page.
This is WP8.1 OS, Visual Studio 2013

The code referenced available is the following....
Me.Frame.Navigate(TypeOf (page_sf))

The compilier is telling me that I need "IS" after this; but no other examples found reference this approach, and I don't know what it wants after the "IS"

Me.Frame.Navigate(TypeOf (page_sf) Is )
0
Thunder724
Asked:
Thunder724
1 Solution
 
hjgodeCommented:
Hello

why do use this TypeOf pattern? The standard call is:
Private Sub HyperlinkButton_Click(sender As Object, e As RoutedEventArgs)
	Me.Frame.Navigate(GetType(page_sf))
End Sub	

Open in new window


See http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh771188.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-6

TypeOf is used for comparison of types whereas GetType returns an object: http://blogs.msmvps.com/joacim/2009/08/31/gettype-and-typeof-confusion/
0
 
Thunder724Author Commented:
OMG, you are correct.  I didn't even think of that.
I'm finding code available in C# more readily then in VB and my conversion ability is new.
thanks, again.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now