<Window x:Class="ScottPlot.Demo.WPF.WpfDemos.PlotViewer"
        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"
        xmlns:local="clr-namespace:ScottPlot.Demo.WPF.WpfDemos"
        mc:Ignorable="d"
        Title="PlotViewer" Height="400" Width="500">
    <DockPanel Margin="10">
        <TextBlock TextWrapping="Wrap" DockPanel.Dock="Top">
            The PlotViewer lets you launch a plot in an
            interactive pop-up window.
            <LineBreak/><LineBreak/>
            You can focus on generating interesting data, 
            and PlotViewer will handle the GUI!
        </TextBlock>

        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">

            <GroupBox Header="Random Walk Generator" Margin="20">
                <StackPanel Orientation="Horizontal">
                    <Label Content="Points:" VerticalAlignment="Center"/>
                    <TextBox x:Name="WalkPointsTextbox" Text="100" Width="35" VerticalAlignment="Center"/>
                    <Button Content="Launch" Padding="5, 3, 5, 3" Margin="5" Click="LaunchRandomWalk"/>
                </StackPanel>
            </GroupBox>

            <GroupBox Header="Sine Wave Generator" Margin="20">
                <StackPanel Orientation="Horizontal">
                    <Label Content="Waves:" VerticalAlignment="Center"/>
                    <TextBox x:Name="SinCountTextbox" Text="3" Width="35" VerticalAlignment="Center"/>
                    <Button Content="Launch" Padding="5, 3, 5, 3" Margin="5" Click="LaunchRandomSin"/>
                </StackPanel>
            </GroupBox>

        </StackPanel>

        <GroupBox Header="Sample Code">
            <ScrollViewer HorizontalScrollBarVisibility="Auto">
                <TextBlock FontFamily="consolas" Margin="5">
// create a ScottPlot<LineBreak/>
var plt = new ScottPlot.Plot();<LineBreak/>
plt.PlotSignal(dataArray);<LineBreak/>
<LineBreak/>  
// launch it in a PlotViewer<LineBreak/>
new ScottPlot.WpfPlotViewer(plt).Show();<LineBreak/>
                </TextBlock>
            </ScrollViewer>
        </GroupBox>

    </DockPanel>
</Window>
