I want to set up an event to run when the `Visibility` is changed on a WPF `Canvas` control.

```
canvas1.VisibleChanged += new EventHandler(canvas1_VisibleChanged);

```

I have tried the above but it doesn't work, anyone know how to do it ?