<Window x:Class="Sample6.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:Sample6"
        mc:Ignorable="d"
        Title="Sample6" Height="150" Width="250">
    <Window.Resources>
        <local:MyCommand1 x:Key="cmd1" />
        <local:MyCommand2 x:Key="cmd2" />
    </Window.Resources>
    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="Black" Offset="0"/>
            <GradientStop Color="White" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>
    <StackPanel>
        <TextBox Name="textBox1" Background="AliceBlue" Margin="10"/>
        <Button Command="{StaticResource cmd1}" Content="Command 1" CommandParameter="{Binding ElementName=textBox1}" Margin="10, 0, 10, 0" />
        <Button Command="{StaticResource cmd2}" Content="Command 2" Margin="10" />
    </StackPanel>
</Window>
