【发布时间】:2013-12-27 23:05:11
【问题描述】:
我最近为我的 Windows Phone 8 应用程序创建了一个 LongListSelector。然而,我现在想要实现的是当用户点击一个项目时导航到另一个页面,但我不知道我的代码中放了什么,而且我也不是 100% 我应该在哪里为每个人插入我的 uri页。有谁知道我如何做到这一点?
如果有人能帮助我解决这个问题,我将不胜感激。
非常感谢。
Partial Public Class Station_Chooser
Inherits PhoneApplicationPage
Public Sub New()
InitializeComponent()
Dim source As New List(Of Glasgow)()
source.Add(New Glasgow("Bridge Street"))
source.Add(New Glasgow("Buchanan Street"))
source.Add(New Glasgow("Cessnock"))
source.Add(New Glasgow("Cowcaddens"))
source.Add(New Glasgow("Govan"))
source.Add(New Glasgow("Hillhead"))
source.Add(New Glasgow("Ibrox"))
source.Add(New Glasgow("Kelvinbridge"))
source.Add(New Glasgow("Kelvinhall"))
source.Add(New Glasgow("Kinning Park"))
source.Add(New Glasgow("Patrick"))
source.Add(New Glasgow("Shields Road"))
source.Add(New Glasgow("St Enoch"))
source.Add(New Glasgow("St George's Cross"))
source.Add(New Glasgow("West Street"))
Dim DataSource As List(Of AlphaKeyGroup(Of Glasgow)) = AlphaKeyGroup(Of Glasgow).CreateGroups(source, System.Threading.Thread.CurrentThread.CurrentUICulture, Function(s As Glasgow)
Return s.Station
End Function, True)
GlasgowSubway.ItemsSource = DataSource
End Sub
Public Class Glasgow
Public Property Station() As String
Get
Return m_Station
End Get
Set(value As String)
m_Station = value
End Set
End Property
Private m_Station As String
Public Sub New(station As String)
Me.Station = station
End Sub
End Class
End Class
【问题讨论】:
标签: vb.net xaml windows-phone-8 windows-phone longlistselector