Private Sub ListView1_ItemClick (Position As Int, Value As Object)   
    Dim f As ExternalFile = Value   
    If f = UpItem Then
        'remove the current folder
        FoldersStack.RemoveAt(FoldersStack.Size - 1)
        'get the parent folder which is now the topmost folder
        Dim folder As ExternalFile = GetCurrentFolder       
        'remove it and enter it again
        FoldersStack.RemoveAt(FoldersStack.Size - 1)
        EnterFolder(folder)
        
    Else
        If f.IsFolder Then           
            EnterFolder(f)
        Else If IsImageFile(f.Name) Then
            LogColor("File name:  " & f.Name, Colors.Red)
            Dim in As InputStream = Storage.OpenInputStream(f)           
            'We can open the image directly with Bitmap.Initialize2 however it will not allow us to use LoadBitmapResize
            'so instead we copy it to a temporary file.
            Dim out As OutputStream = File.OpenOutput(File.DirInternal, "temp", False)           
            File.Copy2(in, out)           
            out.Close
            LoadId1= sp1.Load(File.DirInternal,"temp")                                   
            'ImageView1.SetBackgroundImage(LoadBitmapResize(File.DirInternal, "temp", ImageView1.Width, ImageView1.Height, True))
        End If
    End If
End Sub