How to use it
Add reference and then import it
imports Cover_Flow_Final Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded Dim flow As New CoverFlowControl flow.cache = New ThumbnailManager load() Me.Content = flow End sub Public sub Load Dim Dir as new directoryinfo("C:\Images") for each file as fileinfo in Dir.getfiles("*.jpg") flow.add(file.name,ImageFiletoBytes(file.fullname)) next End sub Public Function ImageFiletoBytes(ByVal ImageFilePath As String) As Byte() Dim _tempByte() As Byte = Nothing If String.IsNullOrEmpty(ImageFilePath) = True Then Throw New ArgumentNullException("Image File Name Cannot be Null or Empty", "ImageFilePath") Return Nothing End If Try Dim _fileInfo As New IO.FileInfo(ImageFilePath) Dim _NumBytes As Long = _fileInfo.Length Dim _FStream As New IO.FileStream(ImageFilePath, IO.FileMode.Open, IO.FileAccess.Read) Dim _BinaryReader As New IO.BinaryReader(_FStream) _tempByte = _BinaryReader.ReadBytes(Convert.ToInt32(_NumBytes)) _fileInfo = Nothing _NumBytes = 0 _FStream.Close() _FStream.Dispose() _BinaryReader.Close() Return _tempByte Catch ex As Exception Return Nothing End Try End Function