Your reference refers to Windows Form apps for Windows, not Windows Phone. The property you're asking about on Windows Phone is Visibility
(not Visible
) so you should be looking for VisibilityChanged
--but that does not exist.
You could, however, create your own by subclassing the control for which you want the event then use your new control. For example:
public class MyControl : SomeOtherControl
{
public MyControl()
{
DefaultStyleKey = typeof(MyControl);
}
public static readonly DependencyProperty VisibilityChangedProperty = DependencyProperty.Register(
"VisibilityChanged",
typeof(string),
typeof(MyControl),
new PropertyMetadata("VisibilityChanged event handler"));
public event VisibilityChangedEventHandler VisibilityChanged;
public delegate void VisibilityChangedEventHandler(object sender, EventArgs e);
public new Visibility Visibility
{
get { return base.Visibility; }
set
{
if (base.Visibility == value) return;
base.Visibility = value;
VisibilityChanged(this, new EventArgs());
}
}
}
Or, of course, if you have complete control of the control's source code, don't bother with the inheritance.