Dim pnHome as Panel
'The panel contains an ImageView
Dim photo As ImageView
Dim bmp As Bitmap
Dim hb, wb, hp, wp As Int
'Bmp can be portrait or landscape with any dimensions
bmp.Height=hb: bmp.Width=wb
'The panel has fixed dimensions
pnHome.Height=hp: pnHome.Width=wp
photo.Gravity=Gravity.FILL
photo.Bitmap=bmp
'photo. Left =?
'photo.Width=?
'photo. Top =?
'photo. Height=?