I have a main form and as sub form. I need the main Form to display the sub Form and pass into the constructor an object. When the sub Form is done it needs to destroy itself so the cycle can be repeated.
Currently I declared the sub form globaly
Public GlobalWindowBookmark As WindowEditBookmark
I then create the form and pass it the object.
GlobalWindowBookmark = New WindowEditBookmark(CType(_MenuBookmark, BookmarkItem))
GlobalWindowBookmark.Visibility = Windows.Visibility.Visible
This just does not feel right and also allows for multiple windows. Any help would be appreciated.
Thanks,