<Window x:Class="Sample5.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:Sample5"
        mc:Ignorable="d"
        Title="Sample5" Height="150" Width="200">
    <Window.Resources>
        <local:MyCommand x:Key="cmd" />
    </Window.Resources>
    <StackPanel>
        <Button Command="{StaticResource cmd}" Margin="10" Content="Button1" />
    </StackPanel>
</Window>
