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


This topic is now archived and is closed to further replies.

  • Create New...