Skip to content

SetHandler Method

Description

Enables event handling for a XAML object which links XAML events with a Subroutine or Function in code.

Syntax

Public Sub SetHandler( _
    ByVal [Handler](#) As Object _
)

Parameters

  • Handler: Reference to the parent object.

Remarks

SetHandler enables event handling for a XAML object. This will link XAML events with a Subroutine or Function in code (VB, C#, etc.).

Any XML Markup that is in the CheckBox, Button, RadioButton, Label, or MarkupLabel control's Caption property will be translated to viewable text. To enable event handling for a XAML object in one of the controls mentioned above, call SetHandler. With SetHandler, you only need to specify the Handler of the control, and all function names will be calculated from Markup.

In the sample below, the "HyperClick" and "Hyperlink_MouseRightButtonUpEvent" subroutines are used to handle the Click and MouseRightButtonUp events of the hyperlink.

Connecting XML events to your code can be very useful if using the MarkupLabel control to create a full-page application using XML. For example, clicking on hyperlinks and buttons, mouse overs, etc.

See Also

Example


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.