Jump to content
Software FX Community

Import doesn't take Section Colors


Recommended Posts

I am using Import and Export to pass formats between to gauges using the XML FileFormat, but they appears to be just minimum and maximum values in the XML and the colors seem to be the default for the Palette selected. 

How do I get the colors to transfer between gauges? 




I have attached the code and an example of the XML where the colors were selected but they do not appear.

 Example XML:

<?xml version="1.0" encoding="UTF-8"?>




































<ITEM type="ChartFX.WinForms.Gauge.Needle">























Public Function PropertyToString(ByRef fromClass As ChartFX.WinForms.Gauge.BaseGauge) As String

  Dim memStream As New MemoryStream()

  Dim reader As StreamReader

  Dim propertyString As String


  fromClass.Export(ChartFX.WinForms.Gauge.FileFormat.XmlTemplate, memStream)

  memStream.Seek(0, SeekOrigin.Begin)


  reader = New StreamReader(memStream)

  propertyString = reader.ReadToEnd()




  Return propertyString

  End Function


  Public Sub StringToClass(ByRef fromString As String, ByRef toClass As ChartFX.WinForms.Gauge.BaseGauge)

  Dim memStream As New MemoryStream()

  Dim writer As StreamWriter


  writer = New StreamWriter(memStream)

  writer.AutoFlush = True


  memStream.Seek(0, SeekOrigin.Begin)


  toClass.Import(ChartFX.WinForms.Gauge.FileFormat.XmlTemplate, memStream)



  End Sub


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...