xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Title="Rocking Robin" Height="350" Width="525">
...
...
And code:
Class MainWindow
Public _SongLibrary As ObservableCollection(Of ASong)
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnLoad.Click
Dim ofd As New Microsoft.Win32.OpenFileDialog
ofd.Filter = "MP3 Files (*.mp3)|*.mp3"
If ofd.ShowDialog = True Then
Dim Sng As New ASong
Sng.FileName = ofd.FileName
Sng.Title = InputBox("Enter Title", "Title", "Default Title")
Sng.Artist = InputBox("Enter Artist", "Artist", "Default Artist")
Sng.Album = InputBox("Enter Album", "Album", "Unknown")
_SongLibrary.Add(Sng)
End If
End Sub
Public Sub New()
' Add any initialization after the InitializeComponent() call.
_SongLibrary = New ObservableCollection(Of ASong)
End Sub
End Class
The play event fires, but there's nothing displayed.
Replies
Know the answer? Post it — somebody with the same question will find it here.