Share via


EventBindingService.ValidateMethodName Method

When overridden in a derived class, determines whether a method name is a valid method name and raises an exception if it is not.

Namespace:  Microsoft.Windows.Design.Services
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public MustOverride Sub ValidateMethodName ( _
    modelEvent As ModelEvent, _
    methodName As String _
)
public abstract void ValidateMethodName(
    ModelEvent modelEvent,
    string methodName
)
public:
virtual void ValidateMethodName(
    ModelEvent^ modelEvent, 
    String^ methodName
) abstract
abstract ValidateMethodName : 
        modelEvent:ModelEvent * 
        methodName:string -> unit 
public abstract function ValidateMethodName(
    modelEvent : ModelEvent, 
    methodName : String
)

Parameters

  • methodName
    Type: System.String
    The name of the method to check.

Remarks

For example, a method name is invalid if it matches a language-specific keyword such as class or event, or if contains non-identifier characters.

The exception that is raised should contain a message indicating the problem that can be displayed to the user.

.NET Framework Security

See Also

Reference

EventBindingService Class

Microsoft.Windows.Design.Services Namespace

ModelEditingScope

ModelEventCollection

Other Resources

WPF Designer Extensibility Architecture