I'm working on getting the code below converted to VB.Net. What am I doing wrong here?
Code: Here is what I tried below. I tried Converting the following Statement:
(gotoAction.Destination, PDFPageDirectDestination).Page = destinationPage
bookmark.Action = gotoAction
To this statement in the following Function: (I used DirectCast)
Public Shared Function CreateBookmark(title As String, bookmarkColor As PDFRgbColor, visualStyle As PDFOutlineItemVisualStyle, destinationPage As PDFPage) As PDFOutlineItem
Dim bookmark As PDFOutlineItem = New PDFOutlineItem()
bookmark.Title = title
bookmark.Color = bookmarkColor
bookmark.VisualStyle = visualStyle
Dim gotoAction As PDFGoToAction = New PDFGoToAction()
gotoAction.Destination = New PDFPageDirectDestination()
DirectCast(gotoAction.Destination, PDFPageDirectDestination).Page = destinationPage
bookmark.Action = gotoAction
Return bookmark
End Function