Class DiagramLayoutJsonConverter
Serializes a DiagramLayout to the EJ2 Diagram LayoutModel JSON shape
({ type, orientation, horizontalSpacing, verticalSpacing, root, fixedNode, margin,
horizontalAlignment, verticalAlignment, enableAnimation }) used by both the init payload and
window.SfDiagram.updateLayout(). Without this converter, reflection-based serialization
emitted PascalCase property names with numeric enums (and MAUI Microsoft.Maui.Thickness internals),
which EJ2 silently ignores — layout updates appeared to do nothing (see
DiagramManager.UpdateLayoutAsync).
Inheritance
DiagramLayoutJsonConverter
Assembly: Syncfusion.Maui.Diagram.dll
Syntax
public sealed class DiagramLayoutJsonConverter : JsonConverter<DiagramLayout>
Constructors
DiagramLayoutJsonConverter()
Declaration
public DiagramLayoutJsonConverter()
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Declaration
public override DiagramLayout Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Returns
Overrides
Write(Utf8JsonWriter, DiagramLayout, JsonSerializerOptions)
Declaration
public override void Write(Utf8JsonWriter writer, DiagramLayout value, JsonSerializerOptions options)
Parameters
Overrides