<!-- Copyright © Northwoods Software Corporation, 2008-2026. All Rights Reserved. -->

<Page x:Class="Demo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="GoWpf Demo">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="3*" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid Grid.Row="0">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="128" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <TextBlock Grid.Row="0" Grid.Column="0" Text="Samples:" HorizontalAlignment="Left" FontWeight="Bold" />
      <ListBox Grid.Row="1" Grid.Column="0" x:Name="myListBox" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
               Background="Transparent" DisplayMemberPath="Name" SelectionChanged="myListBox_SelectionChanged">
        <ListBox.ItemContainerStyle>
          <Style TargetType="ListBoxItem">
            <Setter Property="Padding" Value="0" />
          </Style>
        </ListBox.ItemContainerStyle>
      </ListBox>
      <GridSplitter Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="5" />
      <StackPanel Grid.Row="0" Grid.Column="2" Orientation="Horizontal">
        <TextBlock Text="Current Sample: " HorizontalAlignment="Left" FontWeight="Bold" />
        <TextBlock Text="{Binding ElementName=myListBox, Path=SelectedItem.Name}" />
      </StackPanel>
      <ContentControl Grid.Row="1" Grid.Column="2" x:Name="mySampleContainer" />
      <GridSplitter Grid.Row="0" Grid.Column="3" Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="5" />
      <TextBlock Grid.Row="0" Grid.Column="4" x:Name="myVersion" HorizontalAlignment="Right" />
      <TextBlock Grid.Row="0" Grid.Column="4" Text="Sample Implementation:" HorizontalAlignment="Left" FontWeight="Bold" />
      <TabControl Grid.Row="1" Grid.Column="4">
        <TabItem x:Name="myXamlTabItem" Header="XAML">
          <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <TextBox x:Name="myXamlTextBox" FontFamily="Courier New" FontSize="11"
                     IsReadOnly="True" />
          </ScrollViewer>
        </TabItem>
        <TabItem x:Name="myCodeTabItem" Header="Code">
          <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <TextBox x:Name="myCodeTextBox" FontFamily="Courier New" FontSize="11"
                     IsReadOnly="True" />
          </ScrollViewer>
        </TabItem>
        <TabItem x:Name="myDataTabItem" Header="Data">
          <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <TextBox x:Name="myDataTextBox" FontFamily="Courier New" FontSize="11"
                     IsReadOnly="True" />
          </ScrollViewer>
        </TabItem>
        <TabItem x:Name="mySavedTabItem" Header="Saved">
          <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <TextBox x:Name="mySavedTextBox" FontFamily="Courier New" FontSize="11"
                     AcceptsReturn="True" />
          </ScrollViewer>
        </TabItem>
      </TabControl>
    </Grid>
    <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="5" />
    <WebBrowser Grid.Row="2" x:Name="myComment" />
  </Grid>
</Page>
