The base16 and bast64 format for SaveToString just does not work. It returns nothing. The SML and CompressedXML format works fine.
Also, the LoadFromString give me the error 'Unsupported file format'.
I pass it the string derived from XML or CompressedXml and I get the error.
Any ideas why this is? There is nothing on the forums about this.
I am using the trial version of WPFDiagram.
Please help.
Here is the code I have been testing:
string test1 = diagram.SaveToString(SaveToStringFormat.Base16, false);
string test2 = diagram.SaveToString(SaveToStringFormat.Base64, false);
string test3 = diagram.SaveToString(SaveToStringFormat.Xml, false);
string test4 = diagram.SaveToString(SaveToStringFormat.CompressedXml, false);
diagram.LoadFromString(test4);
The xaml code:
<ScrollViewer Grid.Row="1" Grid.Column="0" Margin="0,0,0,0" Focusable="False" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
<diagram:Diagram x:Name="diagram"
ShowAnchors="Auto"
BackBrush="LightGray"
AlignToGrid="True"
GridSizeX="15"
GridSizeY="15"
ShapeHandlesStyle="HatchHandles3"
ShowGrid="True"
GridColor="Black"
Behavior="DrawLinks"
ShapeBrush="DeepSkyBlue"
DragDrop.DragOver="diagram_DragOver"
DragDrop.Drop="diagram_Drop"
LinkHeadShape="Triangle"
NodeActivated="diagram_NodeActivated"
NodeDeactivated="diagram_NodeDeactivated"
NodeDeleting="diagram_NodeDeleting"
NodeDeleted="diagram_NodeDeleted"
NodeClicked="diagram_NodeClicked"
LinkCreated="diagram_LinkCreated"
LinkDeleting="diagram_LinkDeleting"
LinkClicked="diagram_LinkClicked"
AllowDrop="True" HorizontalContentAlignment="Stretch" />
</ScrollViewer>
<diagram:NodeListView x:Name="shapeList" Grid.Row="0" BorderBrush="Transparent" BorderThickness="0">
<diagram:TableNode x:Name="shapeKbaTable" ConnectionStyle="Both"
ColumnCount="2" RowCount="4" Bounds="2,2,50,50"
Brush="Red" diagram:NodeListView.Label=" KBA Element "
Style="RoundedRectangle" Grid.IsSharedSizeScope="True"
IgnoreLayout="False" Obstacle="False" CellFrameStyle="None" CellCustomDraw="None" AllowDrop="True" />
</diagram:NodeListView>