I need to attribute this site for giving me hints to go in the right direction.
import System
import System.Windows
import System.Windows.Controls
import System.Windows.Navigation
class Exer1(NavigationWindow):
para as TextBlock
button as Button
def constructor():
para = TextBlock(Text:”Hello World!!!”, FontSize:36)
para.VerticalAlignment = VerticalAlignment.Center
para.HorizontalAlignment =HorizontalAlignment.Center
# create a button
//<![CDATA[
//]]>
button = Button(Content:”Click Me”, Height:30, Width:100)
# display the textblock when the button is clicked
button.Click += NavButtonClick
# display the button first
Navigate(button)
protected def NavButtonClick(sender as object, e as RoutedEventArgs):
Navigate(para)
[STAThread]
def Main():
app = Application()
Exer1().Show()
app.Run()