Specifies the default event for a control.
<AttributeUsageAttribute(AttributeTargets.Class)> _ Public NotInheritable Class DefaultEventAttribute _ Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class)] public sealed class DefaultEventAttribute : Attribute
The DefaultEventAttribute type exposes the following members.
Use the Name property to get the name of the default event.
The following example defines a collection class named MyCollection. The class is marked with a DefaultEventAttribute that specifies CollectionChanged as the default event.
private MouseEventHandler onMouseDown; public event MouseEventHandler MouseDown { add { onMouseDown += value; } remove { onMouseDown -= value; } } // Insert additional code.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.