Click to Rate and Give Feedback
.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)
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

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 information on the operating systems and browsers supported by Silverlight, see "Supported Operating Systems and Browsers" in Silverlight Architecture.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker