Skip to content

CreateObject Method

Description

Used to create a XAML Markup object (MarkupObject) when writing Markup in code.

Syntax

Public Function CreateObject( _
    ByVal [Class] As String _
) As MarkupObject

Parameters

  • Class: Name of the class to create (StackPanel, Border, WrapPanel, etc).

Example

Set myBorder = Context.CreateObject("Border")  
myBorder.BorderBrush = Context.CreateSolidBrush(vbYellow)  
myBorder.Width = 400  
myBorder.Height = 400  

Set myThickness = Context.CreateObject("Thickness")  
myThickness.Bottom = 5  
myThickness.Left = 10  
myThickness.Right = 15  
myThickness.Top = 20  

myBorder.BorderThickness = myThickness  

See Also


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