.NET Framework Class Library for Silverlight
ScriptableMemberAttribute Class

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)
Syntax

Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Event, AllowMultiple := False,  _
    Inherited := True)> _
Public NotInheritable Class ScriptableMemberAttribute _
    Inherits Attribute
Visual Basic (Usage)
Dim instance As ScriptableMemberAttribute
C#
[AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event, AllowMultiple = false, 
    Inherited = true)]
public sealed class ScriptableMemberAttribute : Attribute
Remarks

If you want to expose all properties, methods, and events that are associated with a type as scriptable, use the ScriptableTypeAttribute class instead.

Examples

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"; }
}
Inheritance Hierarchy

System..::.Object
  System..::.Attribute
    System.Windows.Browser..::.ScriptableMemberAttribute
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Tags :


Page view tracker