This project is read-only.

svg Path group Color

Jan 24, 2014 at 3:40 PM
Hi,

i am trying to use SVG Shapes to construct VB.net Controls.
I just dont know how to set the color from SVG.Element to VB.net Control.Backcolor

Here is a snippet of my code,

Dim myelement As Svg.SvgElement = MySVG.GetElementById(Trim(LCase(MyLandscape(0))))
    If Not IsNothing(myelement) Then
        Select Case myelement.GetType()
            Case Is = GetType(Svg.SvgPath)
                Dim Mypath As Svg.SvgPath = myelement
                Me.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right Or AnchorStyles.Top
                Me.AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink
                Me.Size = New Size(Mypath.Bounds.Width * cfX, Mypath.Bounds.Height * cfY)
                Me.Location = New Point(Mypath.Bounds.Left * cfX, Mypath.Bounds.Top * cfY)
                Dim Meuse As New Svg.SvgUse

                Dim myattrib As Svg.SvgAttributeCollection = New Svg.SvgAttributeCollection(myelement)
                Dim Mycolorattrib As SvgAttributeAttribute = myattrib.Item(0)
                Dim Mycolor As Svg.SvgColourServer = New Svg.SvgColourServer(myattrib.Item(0))
                Me.BackColor = Mycolor.Colour
                Me.ForeColor = Mycolor.Colour

i would Appreciate any help,

Kind Regards Strom