<Page x:Class="WpfApplication1.StartPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Loaded="Init" />
//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Navigation
Namespace WpfApplication1
Public Partial Class StartPage
Inherits Page
Private txtElement As TextBlock
Private rootPanel As StackPanel
Private aButton As Button
Private Sub Init(sender As Object, args As EventArgs)
rootPanel = New StackPanel()
txtElement = New TextBlock()
aButton = New Button()
aButton.Content = "Press me"
rootPanel.Children.Add(txtElement)
rootPanel.Children.Add(aButton)
End Sub
End Class
End Namespace