<Window x:Class="WpfTunnelBubble.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:WpfTunnelBubble"
        mc:Ignorable="d"
        Title="WpfTunnelBubble"
    Height="250" Width="400">
    <Grid Name="mainGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Name="buttonsgrid" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
            Background="Yellow"
            ButtonBase.Click="buttonsGrid_Click"
            PreviewMouseDown="buttonsGrid_PreviewMouseDown">
            <StackPanel Name="buttonsStackPanel" Height="40"
                Background="LightBlue"
                Orientation="Horizontal" HorizontalAlignment="Center"
                ButtonBase.Click="buttonsStackPanel_Click"
                PreviewMouseDown="buttonsStackPanel_PreviewMouseDown">
                <StackPanel.Resources>
                    <Style TargetType="Button">
                        <Setter Property="Margin" Value="3"/>
                        <Setter Property="Width"  Value="60"/>
                    </Style>
                </StackPanel.Resources>
                <Button Name="Button1" Content="Button 1"
                    PreviewMouseDown="Button1_PreviewMouseDown"
                    Click="Button1_Click" />
                <Button Name="Button2" Content="Button 2"
                    PreviewMouseDown="Button2_PreviewMouseDown"
                    Click="Button2_Click" />
                <Button Name="Button3" Content="Button 3"
                    PreviewMouseDown="Button3_PreviewMouseDown"
                    Click="Button3_Click" />
            </StackPanel>
        </Grid>
        <StackPanel Grid.Row="1" Grid.Column="0"
            Orientation="Vertical"
            Background="LightGreen">
            <StackPanel.Resources>
                <Style TargetType="CheckBox">
                    <Setter Property="Margin" Value="3"/>
                    <Setter Property="HorizontalAlignment" Value="Left"/>
                </Style>
            </StackPanel.Resources>
            <CheckBox Name="gridPreviewCheckBox" Content="Handle in Grid.Preview"/>
            <CheckBox Name="stackPanelPreviewCheckBox" Content="Handle in StackPanel.Preview"/>
            <CheckBox Name="buttonPreviewCheckBox" Content="Handle in Button.Preview"/>
            <CheckBox Name="buttonClickCheckBox" Content="Handle in Button.Click"/>
            <CheckBox Name="stackPanelClickCheckBox" Content="Handle in StackPanel.Click"/>
            <CheckBox Name="gridClickCheckBox" Content="Handle in Grid.Click"/>
        </StackPanel>
        <TextBox Name="resultsTextBox" Grid.Row="1" Grid.Column="1"/>
    </Grid>
</Window>
