<Window x:Class="modsymwpf.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:modsymwpf"
        xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
        Title="Pendulum double" Height="700" Width="1024" 
        ScrollViewer.VerticalScrollBarVisibility="Auto"
        ScrollViewer.CanContentScroll="True"
        xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit">

    <Window.Resources>
        <ResourceDictionary Source="Dictionary1.xaml"/>
    </Window.Resources>


    <Grid x:Name="myGrid">

        <StackPanel Orientation="Horizontal">
            <Canvas x:Name="kanwas" HorizontalAlignment="Left" Height="322" Margin="229,10,0,0" VerticalAlignment="Top" Width="268" RenderTransformOrigin="0.5,0.5">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Rectangle Fill="OliveDrab" Width="50" Height="10" Canvas.Left="75" Canvas.Top="70" />
                <Line x:Name="nitka" Stroke="Black" X1="100" Y1="80" X2="100" Y2="105" StrokeThickness="1" Canvas.Left="0" Canvas.Top="0" />
                <Path Fill="Blue">
                    <Path.Data>
                        <EllipseGeometry x:Name="ball" RadiusX="15" RadiusY="15"  Center="100,105"/>
                    </Path.Data>
                </Path>
                <Line x:Name="nitka2" Stroke="Black" X1="100" Y1="105" X2="100" Y2="165" StrokeThickness="1" Canvas.Left="0" Canvas.Top="0" />

                <Path Fill="Red">
                    <Path.Data>
                        <EllipseGeometry x:Name="ball2" RadiusX="15" RadiusY="15"  Center="100,165"/>
                    </Path.Data>
                </Path>
            </Canvas>
        </StackPanel>
        <ScrollViewer x:Name="scroll">

            <TabControl Width="700" Height="Auto" Margin="10,320">
                <TabItem Header="DANE">
                    <StackPanel Background="AliceBlue">
                        <StackPanel Style="{StaticResource stackPanel}">

                            <Label Content="L1:" Style="{StaticResource Label}"/>
                            <TextBox x:Name="textL1" Text="80" Style="{StaticResource textBox}"/>
                            <Label Content="m1:" Style="{StaticResource Label}"/>
                            <TextBox x:Name="textM1" Text="2" Style="{StaticResource textBox}"/>
                            <Label Content="theta1:" Style="{StaticResource Label}"/>
                            <TextBox x:Name="textTheta1" Text="1,4" Style="{StaticResource textBox}"/>
                            <Label Content="Velocity1:" Style="{StaticResource Label}"/>
                            <TextBox x:Name="textVelocity1" Text="0" Style="{StaticResource textBox}"/>
                        </StackPanel>
                        <StackPanel Style="{StaticResource stackPanel}">
                            <Label Content="L2:" Style="{StaticResource Label}" />
                            <TextBox x:Name="textL2" Text="90" Style="{StaticResource textBox}"/>
                            <Label Content="m2:" Style="{StaticResource Label}" />
                            <TextBox x:Name="textM2" Text="6" Style="{StaticResource textBox}"/>
                            <Label Content="theta2:" Style="{StaticResource Label}"/>
                            <TextBox x:Name="textTheta2" Text="1,4" Style="{StaticResource textBox}"/>
                            <Label Content="Velocity2:" Style="{StaticResource Label}"/>
                            <TextBox x:Name="textVelocity2" Text="0" Style="{StaticResource textBox}"/>

                        </StackPanel>
                        <StackPanel Style="{StaticResource stackPanel}">
                            <Label Content="N =" Style="{StaticResource Label}" FontSize="16"/>
                            <Label x:Name="textN" Content="0" VerticalAlignment="Center" FontSize="16" Width="60"/>

                            <Button x:Name="ButtonStart" Style="{StaticResource buton}" Click="Button_Click" Content="START"></Button>
                            <Button x:Name="ButtonStop" Style="{StaticResource buton}" Click="Button_Click_1" Content="STOP" IsEnabled="False"/>
                        </StackPanel>
                    </StackPanel>
                </TabItem>
                <TabItem Header="Position x1(t)" >
                    <Grid >

                        <chartingToolkit:Chart  FontWeight="Bold" Background="Chocolate" Height="500" HorizontalAlignment="Center" Name="Chart_posx1" Title="Posx1" Width="600" >
                            <chartingToolkit:LineSeries  Title="Posx1(t)" DependentValuePath="Value"  IndependentValuePath="Key" ItemsSource="{Binding}" >

                            </chartingToolkit:LineSeries>
                        </chartingToolkit:Chart>

                    </Grid>
                </TabItem>

                <TabItem Header="Position y1(t)">
                    <Grid>
                        <Grid>
                            <chartingToolkit:Chart FontWeight="Bold" Background="Chartreuse" Grid.Row="2" Height="500" HorizontalAlignment="Center" Name="Chart_posy1" Title="Posy1" Width="600">
                                <chartingToolkit:LineSeries Title="Posy1(t)"  DependentValuePath="Value"  IndependentValuePath="Key" ItemsSource="{Binding}">

                                </chartingToolkit:LineSeries>
                            </chartingToolkit:Chart>
                        </Grid>
                    </Grid>
                </TabItem>

                <TabItem Header="Position x2(t)">
                    <Grid >
                        <chartingToolkit:Chart FontWeight="Bold"  Background="CadetBlue" Grid.Row="2" Height="500" HorizontalAlignment="Center" Name="Chart_posx2" Title="Posx2" Width="600">
                            <chartingToolkit:LineSeries  Title="Posx2(t)" DependentValuePath="Value"  IndependentValuePath="Key" ItemsSource="{Binding}">

                            </chartingToolkit:LineSeries>
                        </chartingToolkit:Chart>
                    </Grid>
                </TabItem>
                <TabItem Header="Position y2(t)">
                    <Grid>
                        <Grid>
                            <chartingToolkit:Chart FontWeight="Bold" Background="Yellow" Grid.Row="2" Height="500" HorizontalAlignment="Center" Name="Chart_posy2" Title="Posy2" Width="600">
                                <chartingToolkit:LineSeries Title="Posy2(t)" DependentValuePath="Value"  IndependentValuePath="Key" ItemsSource="{Binding}">

                                </chartingToolkit:LineSeries>
                            </chartingToolkit:Chart>
                        </Grid>
                    </Grid>
                </TabItem>

            </TabControl>
        </ScrollViewer>
    </Grid>
</Window>
