using System;
using System.Windows;
using System.Diagnostics;

namespace EventExamples
{
    public partial class HaltingEvents : System.Windows.Window
    {

        public HaltingEvents()
        {
            InitializeComponent();
        }

        // Example 4-3. Halting event routing with Handled

        void ButtonDownCanvas(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine("ButtonDownCanvas");
            e.Handled = true;
        }

        // End of Example 4-3.


        void PreviewMouseDownButton(object sender, RoutedEventArgs e)
        { Debug.WriteLine("PreviewMouseDownButton"); }

        void MouseDownButton(object sender, RoutedEventArgs e)
        { Debug.WriteLine("MouseDownButton"); }


        void PreviewMouseDownGrid(
          object sender, RoutedEventArgs e)
        { Debug.WriteLine("PreviewMouseDownGrid"); }

        void MouseDownGrid(object sender, RoutedEventArgs e)
        { Debug.WriteLine("MouseDownGrid"); }


        void PreviewMouseDownCanvas(object sender, RoutedEventArgs e)
        { Debug.WriteLine("PreviewMouseDownCanvas"); }


        void PreviewMouseDownEllipse(object sender, RoutedEventArgs e)
        { Debug.WriteLine("PreviewMouseDownEllipse"); }

        void MouseDownEllipse(object sender, RoutedEventArgs e)
        { Debug.WriteLine("MouseDownEllipse"); }
    }
}