Dim context As MarkupContext Private Sub Form_Load()
Dim StackPanel As MarkupStackPanel Set StackPanel = context.CreateObject("StackPanel")
StackPanel.Orientation = xtpMarkupOrientationVertical
StackPanel.Children.Add TextBlock1 StackPanel.Children.Add Border StackPanel.Children.Add Canvas
Set e = context.Parse("<WrapPanel><TextBlock>WrapPanelText</TextBlock></WrapPanel>") StackPanel.Children.Add e StackPanel.Children.Add context.Parse("<DockPanel><TextBlock>DockPanelText</TextBlock></DockPanel>") StackPanel.Children.Add context.Parse("<Ellipse Width='10' Height='10' Fill='Red'/>")
StackPanel.Children.Add context.Parse("<Rectangle Width='10' Height='10' Fill='Black' RadiusX='3' RadiusY='4' />") StackPanel.Children.Add context.Parse("<Line X2='10' Y2='10' Stroke='Black' />") StackPanel.Children.Add context.Parse("<TextBlock><Rectangle Width='10' Height='10' Fill='Black'/> It was rectangle</TextBlock>")
Dim Grid1 As MarkupGrid, GridEllipse1 As MarkupEllipse, GridEllipse2 As MarkupEllipse, GridEllipse3 As MarkupEllipse Dim ColumnDef As MarkupColumnDefinition, RowDef As MarkupRowDefinition
Set Grid1 = context.CreateObject("Grid")
Set ColumnDef = context.CreateObject("ColumnDefinition") Grid1.ColumnDefinitions.Add ColumnDef Set ColumnDef = context.CreateObject("ColumnDefinition") Grid1.ColumnDefinitions.Add ColumnDef
Set RowDef = context.CreateObject("RowDefinition") Grid1.RowDefinitions.Add RowDef Set RowDef = context.CreateObject("RowDefinition") Grid1.RowDefinitions.Add RowDef
Set GridEllipse1 = context.CreateObject("Ellipse") Set GridEllipse2 = context.CreateObject("Ellipse") Set GridEllipse3 = context.CreateObject("Ellipse")
GridEllipse3.AddHandler GridEllipse3.MouseEnterEvent, "GridEllipse3MouseEnter"
GridEllipse1.Width = 30 GridEllipse1.Height = 30 GridEllipse1.Fill = context.CreateSolidBrush(vbGreen)
GridEllipse2.Width = 30 GridEllipse2.Height = 30 GridEllipse2.Stroke = context.CreateSolidBrush(vbRed)
GridEllipse3.Width = 30 GridEllipse3.Height = 30 GridEllipse3.Fill = context.CreateSolidBrush(vbYellow)
Grid1.Children.Add GridEllipse1 Grid1.Children.Add GridEllipse2 Grid1.Children.Add GridEllipse3
Grid1.SetColumn GridEllipse2, 1 Grid1.SetColumn GridEllipse3, 1 Grid1.SetRow GridEllipse3, 1
StackPanel.Children.Add Grid1
Dim Spi As MarkupInputElement Set Spi = StackPanel StackPanel.AddHandler Hyperlink.ClickEvent, "HyperClick" context.SetHandler Me
Set MarkupLabel1.MarkupUIElement = StackPanel
End Sub
|
i get above code from "online help" in codejock xtreme suite pro.
but i get error "object variable or with block not set"
any suggestion?please help..