<HeaderedContentControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignWidth="1280" d:DesignHeight="720"
    Style="{StaticResource SampleControlStyle}"
    Header="StackPanel"
    Tag="https://www.noesisengine.com/docs/Gui.Core._StackPanel.html">

  <StackPanel>
    <TextBlock Style="{StaticResource SampleSectionDesc}" Text="The StackPanel is used to arrange items in a line, either horizontally or vertically."/>
    <HeaderedContentControl Style="{StaticResource SampleSectionStyle}" Tag="https://www.noesisengine.com/xamltoy/6c90ca58c59bdfabe42eff7ef41bd794" TabIndex="100">
      <HeaderedContentControl.Header>
        <StackPanel>
          <TextBlock Style="{StaticResource SampleSectionTitle}" Text="Content layout"/>
          <TextBlock Style="{StaticResource SampleSectionDesc}" Margin="0,5,0,0">
            <Run>Children items are stacked in the direction specified by the</Run>
            <Run FontWeight="Bold">Orientation</Run>
            <Run>property.</Run>
          </TextBlock>
        </StackPanel>
      </HeaderedContentControl.Header>
      <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
        <StackPanel Orientation="Horizontal" Margin="0,0,0,20">
          <TextBlock Text="Orientantion" VerticalAlignment="Center"/>
          <ComboBox x:Name="orientation" Width="200" Margin="15,0,0,0" SelectedIndex="1">
            <ComboBoxItem Content="Horizontal"/>
            <ComboBoxItem Content="Vertical"/>
          </ComboBox>
        </StackPanel>
        <Border Background="{DynamicResource Brush.Background.Popup}" BorderBrush="{DynamicResource Brush.Border.Normal}" BorderThickness="1">
          <StackPanel Orientation="{Binding SelectedItem.Content, ElementName=orientation}" Width="350" Height="200">
            <Rectangle Fill="#7FFFEC" MinWidth="75" MinHeight="40" Margin="2"/>
            <Rectangle Fill="Turquoise" MinWidth="75" MinHeight="40" Margin="2"/>
            <Rectangle Fill="LightSeaGreen" MinWidth="75" MinHeight="40" Margin="2"/>
            <Rectangle Fill="Teal" MinWidth="75" MinHeight="40" Margin="2"/>
          </StackPanel>
        </Border>
      </StackPanel>
    </HeaderedContentControl>
  </StackPanel>
</HeaderedContentControl>
