 <Grid  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Margin="5"  ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Label Content="play nienaciśnięty"/>
        <Label Grid.Column="1" Content="play naciśnięty 1x"/>
        <Label  Grid.Column="2" Content="play naciśnięty 2x"/>
        <Grid  Height="93" Width="231" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Content="{Binding Path=IsChecked, ElementName=toggleButton}" />
            <ToggleButton Grid.Row="1" x:Name="toggleButton" IsThreeState="{Binding ElementName=isTSToggleButton, Path=IsChecked}">
                <Polyline Stroke="Green" Fill="Green" Points="0,0 0,10 5,5"></Polyline>
            </ToggleButton>
            <ToggleButton Margin="20" Grid.Row="1" Grid.Column="1" Content="IsThreeState" x:Name="isTSToggleButton"/>
        </Grid>
        <Grid  Height="93" Width="231" Grid.Row="1" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Content="{Binding Path=IsChecked, ElementName=toggleButton1}" />
            <ToggleButton Grid.Row="1" x:Name="toggleButton1" IsThreeState="{Binding ElementName=isTSToggleButton1, Path=IsChecked}">
                <Polyline Stroke="Green" Fill="Green" Points="0,0 0,10 5,5"></Polyline>
            </ToggleButton>
            <ToggleButton Margin="20" Grid.Row="1" Grid.Column="1" Content="IsThreeState" x:Name="isTSToggleButton1"/>
        </Grid>
        <Grid Height="93" Width="231" Grid.Row="1" Grid.Column="2">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Content="{Binding Path=IsChecked, ElementName=toggleButton2}" />
            <ToggleButton Grid.Row="1" x:Name="toggleButton2" IsThreeState="{Binding ElementName=isTSToggleButton2, Path=IsChecked}">
                <Polyline Stroke="Green" Fill="Green" Points="0,0 0,10 5,5"></Polyline>
            </ToggleButton>
            <ToggleButton Margin="20" Grid.Row="1" Grid.Column="1" Content="IsThreeState" x:Name="isTSToggleButton2"/>
        </Grid>
        <Grid  Height="93" Width="231" Grid.Row="2" Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Content="{Binding Path=IsChecked, ElementName=toggleButton3}" />
            <ToggleButton Grid.Row="1" x:Name="toggleButton3" IsThreeState="{Binding ElementName=isTSToggleButton3, Path=IsChecked}">
                <Polyline Stroke="Green" Fill="Green" Points="0,0 0,10 5,5"></Polyline>
            </ToggleButton>
            <ToggleButton Margin="20" Grid.Row="1" Grid.Column="1" Content="IsThreeState" x:Name="isTSToggleButton3"/>
        </Grid>
        <Grid  Height="93" Width="231" Grid.Row="2" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Content="{Binding Path=IsChecked, ElementName=toggleButton4}" />
            <ToggleButton Grid.Row="1" x:Name="toggleButton4" IsThreeState="{Binding ElementName=isTSToggleButton4, Path=IsChecked}">
                <Polyline Stroke="Green" Fill="Green" Points="0,0 0,10 5,5"></Polyline>
            </ToggleButton>
            <ToggleButton Margin="20" Grid.Row="1" Grid.Column="1" Content="IsThreeState" x:Name="isTSToggleButton4"/>
        </Grid>
        <Grid Height="93" Width="231" Grid.Row="2" Grid.Column="2">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Content="{Binding Path=IsChecked, ElementName=toggleButton5}" />
            <ToggleButton Grid.Row="1" x:Name="toggleButton5" IsThreeState="{Binding ElementName=isTSToggleButton5, Path=IsChecked}">
                <Polyline Stroke="Green" Fill="Green" Points="0,0 0,10 5,5"></Polyline>
            </ToggleButton>
            <ToggleButton Margin="20" Grid.Row="1" Grid.Column="1" Content="IsThreeState" x:Name="isTSToggleButton5"/>
        </Grid>

    </Grid>
