Skip to content

MarkupContext Property

Description

Connects events in XML Markup with actual methods, functions, and events in your code.

Property Type

Read-only property

Syntax (Visual Basic)

Public Property MarkupContext() As [MarkupContext](XtremeCommandBars~MarkupContext.md)

Remarks

The SetMethod of the MarkupContext object is used to connect method calls in XML Markup with actual methods, functions, and events in your code.

For example, using SetMethod, the Label control can handle events called from XML Markup with Markup enabled.

When EnableMarkup is true, any XML Markup text will be translated to viewable text. Using SetMethod, an external method or event can be called. In the sample below, the "Hyperlink_Click" subroutine is "connected" to the XML Hyperlink Click event using SetMethod.

Connecting XML events to your code can be very useful when using the Label control to create a full-page application using XML, such as clicking on hyperlinks and buttons.

Example

Public Sub Hyperlink_Click(Reserved1 As Object, Reserved2 As Object)  
    MsgBox "Clicked"  
End Sub  

Private Sub Form_Load()  
    Label1.EnableMarkup = True  
    Label1.MarkupContext.SetMethod Me, "Hyperlink_Click"  
    Label1.Caption = "Click this link"  
End Sub

See Also


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