Partial Public Class MainPage
    Inherits UserControl

    Public Sub New()
        InitializeComponent()
    End Sub

    Private Sub Show(ctl As Control)
        ' Display the specified control in the MainPage.
        ' The currently displayed control is replaced with the new one.
        placeHolder.Content = ctl
    End Sub

    Private Sub showSimpleBinding_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showSimpleBinding.Click
        Show(New SimpleBinding())
    End Sub

    Private Sub showServerSideFiltering_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showServerSideFiltering.Click
        Show(New ServerSideFiltering())
    End Sub

    Private Sub showMasterDetailBinding_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showMasterDetailBinding.Click
        Show(New MasterDetailBinding())
    End Sub

    Private Sub showPaging_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showPaging.Click
        Show(New Paging())
    End Sub

    Private Sub showLargeDataSet_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showLargeDataSet.Click
        Show(New LargeDataset())
    End Sub

    Private Sub showCustomColumns_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showCustomColumns.Click
        Show(New CustomColumns())
    End Sub

    Private Sub showDataSourcesInCode_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showDataSourcesInCode.Click
        Show(New DataSourcesInCode())
    End Sub

    Private Sub showClientSideQuerying_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showClientSideQuerying.Click
        Show(New ClientSideQuerying())
    End Sub

    Private Sub showCategoryProductsView_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles showCategoryProductsView.Click
        Show(New CategoryProductsView())
    End Sub
End Class