<Window x:Class="XamlProj.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="XamlProj">

  <Grid>
    <Button Name="myButton" Click="InlineClickHandler">Click!</Button>

  </Grid>
  <x:Code><![CDATA[
    void InlineClickHandler(object sender, RoutedEventArgs e) {
      myButton.Background = Brushes.Blue;
    }
  ]]></x:Code>
</Window>

