I am WPF newbie. In a WPF sample code I am looking at, there is a mouse event handler as follows:
namespace Recipe_04_15
{
public class DragCanvasControl : Canvas
{
...
static DragCanvasControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(DragCanvasControl),
new FrameworkPropertyMetadata(typeof(DragCanvasControl)));
}
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
{
...
}
...
What I don't understand is how the OnPreviewMouseLeftButtonDown method is wired to the mouse button down event. The XAML code does not have events specified?