Dim BorderSize As Int = 10dip
pnlBack.Initialize("")
Activity.AddView(pnlBack, 0, 0, 200dip + BorderSize * 2, 200dip + BorderSize * 2)
Dim cd As ColorDrawable
cd.Initialize(Colors.White, 10dip)
pnlBack.Background = cd
Dim gdb As GradientDrawable
Dim GradColors(3) As Int = Array As Int(Colors.red, Colors.Yellow , Colors.Blue)
gdb.Initialize("TOP_BOTTOM", GradColors)
gdb.CornerRadius = 10dip
pnlFore.Initialize("")
Activity.AddView(pnlFore, BorderSize, BorderSize, 200dip, 200dip)
pnlFore.Background = gdb