Hi David,
Our Blazor API is direct port from WinForms library (version 7), but base types like Point, Rect, Color come from the multi-platform Microsoft.Maui.Graphics instead of Windows-only System.Drawing, and float-type properties have been changed to double now. Here's code from the WinForms sample project I think your image is based on ported to Blazor version:
double rh = diagram.TableRowHeight;
double th = diagram.TableCaptionHeight;
double totalh = th + 4 * rh;
TableNode t = new TableNode(diagram);
t.Bounds = new Rect(5, 5, 30 + 2 * rh, totalh);
t.Caption = "test";
diagram.Nodes.Add(t);
// add buttons to the table
Group buttons = diagram.Factory.CreateGroup(t);
// create the help button
Rect rc = t.Bounds;
ShapeNode btn = new ShapeNode(diagram);
btn.Bounds = new Rect(rc.Left + 1.4F, rc.Bottom - rh, rh, rh);
btn.Transparent = true;
btn.Image = LoadImage("ac0001-64.png"); //images.Images[3];
btn.ImageAlign = MindFusion.Drawing.ImageAlign.Center;
buttons.AttachToCorner(btn, 3);
btn.Locked = true;
btn.Tag = 1;
diagram.Nodes.Add(btn);
// create the info button
btn = new ShapeNode(diagram);
btn.Bounds = new Rect(rc.Left + 2.0F + rh, rc.Bottom - rh, rh, rh);
btn.Transparent = true;
btn.Image = LoadImage("ac0001-64.png"); //images.Images[4];
btn.ImageAlign = MindFusion.Drawing.ImageAlign.Center;
buttons.AttachToCorner(btn, 3);
btn.Locked = true;
btn.Tag = 3;
diagram.Nodes.Add(btn);
// set table properties
LinearGradientBrush tbrush = new
LinearGradientBrush(
Color.FromRgb(224, 233, 233),
Color.FromRgb(156, 170, 198), 90);
tbrush.Colors = new []
{
Color.FromRgb(224, 233, 233),
Colors.Black,
Color.FromRgb(224, 233, 233),
Color.FromRgb(102, 154, 204)
};
tbrush.Positions = new double[]
{
0, th / totalh, th / totalh, 1
};
t.Brush = tbrush;
t.RowCount = 3;
t.ColumnCount = 4;
t.Scrollable = false;
t.EnabledHandles = AdjustmentHandles.Move;
t.CellFrameStyle = CellFrameStyle.None;
t.HandlesStyle = HandlesStyle.HatchHandles3;
t.Columns[0].Width = rh;
t.Columns[3].Width = rh;
t.Columns[1].Width = 15;
t.Columns[2].Width = 15;
t.Shape = SimpleShape.RoundedRectangle;
t.CaptionBrush = new MindFusion.Drawing.SolidBrush(Colors.White);
// set connection points
AnchorPoint ptin = new AnchorPoint(50, 50, true, false, Color.FromRgb(206, 0, 0), 0);
AnchorPoint ptout = new AnchorPoint(50, 50, false, true, Color.FromRgb(206, 0, 0), 3);
ArrayList al = new ArrayList();
for (int i = 0; i <= 2; i++)
{
al.Clear();
//if (!(form.GetInput(i) == null))
{
t[0, i].ImageAlign = MindFusion.Drawing.ImageAlign.Center;
t[0, i].Image = LoadImage("ac0001-64.png"); //images.Images[0];
t[1, i].Text = "1";//form.GetInput(i);
al.Add(ptin.Clone());
}
//if (!(form.GetOutput(i) == null))
{
t[3, i].ImageAlign = MindFusion.Drawing.ImageAlign.Center;
t[3, i].Image = LoadImage("ac0001-64.png");// images.Images[1];
t[2, i].Text = "2"; //form.GetOutput(i);
t[2, i].TextFormat.Alignment = StringAlignment.Far;
al.Add(ptout.Clone());
}
t.Rows[i].AnchorPattern = new AnchorPattern(
(AnchorPoint[])al.ToArray(typeof(AnchorPoint)));
}
Also check the SpanningCells sample project from our Blazor distribution.
Regards,
Slavcho
Mindfusion