Hi all, happy New Year.
I am having trouble with some behavior in ContainerNodes that seems a bit odd.
If you take the Anchors.zip official example project (the forum prevents me from providing a link, but if you Google "mindfusion anchors sample" it should be the first result).
And you delete all the code in the Form1_Load() function and replace it with this:
private void Form1_Load(object sender, EventArgs e)
{
var container = new ContainerNode();
container.Font = new Font("Segoe UI", 10);
container.Caption = "テスト";
container.Bounds = new RectangleF(0, 0, 20, 20);
diagram.Nodes.Add(container);
}
This looks fine when you run it (see attachment: 1.png). Even though "Segoe UI" font doesn't support Japanese characters, the renderer apparently falls back to some other font and displays the text, as is common for WinForms controls.
However if I pass in a Diagram to the ToolContainer constructor, it seems that this breaks the fallback behavior, and the text is rendered as boxes (see attachment: 2.png). That code is like this:
private void Form1_Load(object sender, EventArgs e)
{
var container = new ContainerNode(new Diagram());
container.Font = new Font("Segoe UI", 10);
container.Caption = "テスト";
container.Bounds = new RectangleF(0, 0, 20, 20);
diagram.Nodes.Add(container);
}
I have to explicitly set a Japanese font, like MS Gothic, instead of Segoe UI, for the text to render correctly (on the 4th line there).
So my question is, how can I give the ToolContainer a parent Diagram while still maintaining font fallback ability?
Thanks in advance.