Codejock Forums Homepage
Forum Home Forum Home > General > XAML Snippets
  New Posts New Posts RSS Feed - error,please help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

error,please help

 Post Reply Post Reply
Author
Message
tonywei View Drop Down
Newbie
Newbie


Joined: 19 October 2012
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote tonywei Quote  Post ReplyReply Direct Link To This Post Topic: error,please help
    Posted: 19 October 2012 at 1:49am

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..
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.