<Window x:Class="Datenbindung.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:y="clr-namespace:Datenbindung"
        Title="Datenbindung" Height="350" Width="525">
    <Window.Resources>
        <y:HighScore x:Key="scoreData" />
        <y:IntConverter x:Key="IntConverter" />
    </Window.Resources>


    <TabControl Name="tabControl1" SelectedIndex="0">
        <TabItem Header="Werte" Name="tabItem1">

            <DockPanel>
                <Slider Name="sliderV"  Orientation="Vertical" 
                        Maximum="150" Minimum="50" Value="100" SmallChange="1" LargeChange="10"  />
                <Slider Name="sliderH"  Orientation="Horizontal" 
                        Maximum="150" Minimum="50" Value="100" SmallChange="1" LargeChange="10" DockPanel.Dock="Top" />
                <Label  Name="label1" Background="#FF31CB31" 
                        Width="{Binding Path=Value, ElementName=sliderH}" 
                        Height="{Binding Path=Value, ElementName=sliderV}">
                        Hallo</Label>

            </DockPanel>

        </TabItem>
        <TabItem Header="Objekte" Name="tabItem2">
            <Grid>
                <Label Content="Der Spieler" Height="28" Margin="25,35,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="71" />
                <TextBox Name="tbName"  Margin="100,35,0,0" Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" IsReadOnly="True" HorizontalContentAlignment="Center" />
                <Label Margin="206,35,0,0" Content="hat" Height="28" HorizontalAlignment="Left" VerticalAlignment="Top" Width="33" />
                <TextBox Name="tbPoints" Margin="239,35,0,0" Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" HorizontalContentAlignment="Center" IsReadOnly="True" 
                         Text="{Binding Source={x:Static y:MainWindow.score}, Path=PlayerScore, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource IntConverter}}" />
                <Label Content="Punkte erreicht." Margin="0,35,56,0" Height="28" HorizontalAlignment="Right" VerticalAlignment="Top" Width="91" />
            </Grid>
        </TabItem>
        <TabItem Header="Auflistungen" Name="tabItem3">
            <Grid>
                <ListBox Name="listBox1" ItemsSource="{Binding Source={StaticResource scoreData}}"
                         Height="79" HorizontalAlignment="Left" Margin="34,45,0,0" VerticalAlignment="Top" Width="241"  />
                <Label Content="Wählen Sie einen Spieler aus:" Height="28" HorizontalAlignment="Left" Margin="34,157,0,0" Name="label2" VerticalAlignment="Top" Target="{Binding}" />
                <ListBox Name="listBox2" ItemsSource="{Binding Source={StaticResource scoreData}}"
                         Height="66" HorizontalAlignment="Left" Margin="34,191,0,0" VerticalAlignment="Top" Width="164"  HorizontalContentAlignment="Right" Padding="5" 
                         SelectionChanged="listBox2_SelectionChanged" SelectedValuePath="PlayerScore" DisplayMemberPath="PlayerName" />
                <Label Content="Erreichte Punktzahl:" Height="28" HorizontalAlignment="Left" Margin="221,209,0,0" Name="label3" VerticalAlignment="Top" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="341,211,0,0" Name="tbResult" VerticalAlignment="Top" Width="120" />
            </Grid>
        </TabItem>
    </TabControl>
</Window>
