Sub SwitchAndInsertView(view As Int) 'Changes the content window to host an Image, or a Video.
If view = CurrentView Then Return 'If we are requesting the same thing as before, we just simply exit.
Main.pnlContent.RemoveAllNodes 'Remove all views from the Panel.
If view = 1 Then 'We are putting in an image.
Log("Initializing ImageView")
If imgContent.IsInitialized = False Then
imgContent.Initialize("imgContent")
End If
Main.pnlContent.AddNode(imgContent, 0, 0, pnlContentWidth, pnlContentHeight)
imgContent.Alpha = 1
imgContent.Width = pnlContentWidth
imgContent.Height = pnlContentHeight
CSSUtils.SetBackgroundColor(imgContent, fx.Colors.ARGB(255, 0, 0, 0))
' Else if view = 2 Then 'We are putting in a video
End If
CurrentView = view
End Sub