Indicates that a specific property, method, or event is accessible to JavaScript callers.
Namespace:
System.Windows.Browser
Assembly:
System.Windows.Browser (in System.Windows.Browser.dll)
Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Event, AllowMultiple := False, _
Inherited := True)> _
Public NotInheritable Class ScriptableMemberAttribute _
Inherits Attribute
Dim instance As ScriptableMemberAttribute
[AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event, AllowMultiple = false,
Inherited = true)]
public sealed class ScriptableMemberAttribute : Attribute
If you want to expose all properties, methods, and events that are associated with a type as scriptable, use the ScriptableTypeAttribute class instead.
The following example shows how you make a property, method, or event (PME) scriptable by applying the ScriptableMemberAttribute immediately before the name of the PME.
public class SMT_ScriptableManagedType
{
[ScriptableMember] // This is the preferred syntax
public string GetString()
{ return "abcdefg"; }
[ScriptableMemberAttribute] // This is also acceptable
public string GetString()
{ return "abcdefg"; }
}
System..::.Object
System..::.Attribute
System.Windows.Browser..::.ScriptableMemberAttribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Reference