<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.SimpleStackPanelPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
    mc:Ignorable="d">
    <ScrollViewer>
        <ui:SimpleStackPanel Style="{StaticResource ControlPageContentPanelStyle}">
            <sc:ControlExample
                x:Name="Example1"
                HeaderText="A SimpleStackPanel control.">

                <ui:SimpleStackPanel
                    x:Name="Control1"
                    VerticalAlignment="Top"
                    Orientation="Vertical">
                    <ui:SimpleStackPanel.Resources>
                        <Style TargetType="Rectangle">
                            <Setter Property="Height" Value="40" />
                            <Setter Property="Width" Value="40" />
                        </Style>
                    </ui:SimpleStackPanel.Resources>
                    <Rectangle Fill="Red" />
                    <Rectangle Fill="Blue" />
                    <Rectangle Fill="Green" />
                    <Rectangle Fill="Yellow" />
                </ui:SimpleStackPanel>

                <sc:ControlExample.Options>
                    <ui:SimpleStackPanel Style="{StaticResource OptionsPanelStyle}">
                        <ui:RadioButtons
                            ItemsSource="{Binding Source={x:Type Orientation}, Converter={StaticResource EnumValuesConverter}}"
                            SelectedItem="{Binding ElementName=Control1, Path=Orientation}" />
                        <ui:NumberBox
                            Header="Spacing"
                            Minimum="0"
                            Value="{Binding ElementName=Control1, Path=Spacing}"
                            SpinButtonPlacementMode="Inline" />
                    </ui:SimpleStackPanel>
                </sc:ControlExample.Options>

            </sc:ControlExample>
        </ui:SimpleStackPanel>
    </ScrollViewer>
</ui:Page>
