<Window x:Class="EventSetter_Sample.MainWindow"
        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:EventSetter_Sample"
        mc:Ignorable="d"
     Title="EventSetterSample" Width="350" Height="180">
    <Window.Background>
        <LinearGradientBrush>
            <GradientStop Color="Black" Offset="0" />
            <GradientStop Color="White" Offset="1" />
        </LinearGradientBrush>
    </Window.Background>
    <Window.Resources>
        <Style TargetType="ListBox">
            <Setter Property="Margin" Value="5" />
            <EventSetter Event="SelectionChanged" Handler="lst_SelectionChanged" />
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <ListBox Name="lstCountries">
            <ListBoxItem>Australien</ListBoxItem>
            <ListBoxItem>Thailand</ListBoxItem>
            <ListBoxItem>Seychellen</ListBoxItem>
        </ListBox>
        <ListBox Grid.Column="1" Name="lstCities" SelectionChanged="lstCities_SelectionChanged"  >
            <ListBoxItem>Hamburg</ListBoxItem>
            <ListBoxItem>München</ListBoxItem>
            <ListBoxItem>Berlin</ListBoxItem>
        </ListBox>
        <TextBox Grid.Column="0" Grid.Row="1" Margin="5" Name="txtSelection">...</TextBox>
    </Grid>
</Window>
