Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic EnableStyledText = true; not working (Read 2019 times)
kunal
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jul 30th, 2013
EnableStyledText = true; not working
Jul 30th, 2013 at 3:21pm
Print Post  
I cannot get HTML to display for node text. I am using very simple example with ImageMap mode. The code is below

using MindFusion.Diagramming;
using MindFusion.Diagramming.Layout;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.IO;
using SolidBrush = MindFusion.Drawing.SolidBrush;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.DiagramView1.Diagram.DefaultShape = Shapes.Rectangle;
Factory factory = DiagramView1.Diagram.Factory;
ShapeNode n1 = factory.CreateShapeNode(32, 12, 35, 18);
n1.EnableStyledText = true;
n1.Text = "Executive Director" + "\n" + "<i> George Smith </i>" + "\n" + "<b><color=#009900> President and CEO</color></b>";
}
}

------

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>


<%@ Register Assembly="MindFusion.Diagramming.WebForms" Namespace="MindFusion.Diagramming.WebForms"
    TagPrefix="ndiag" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>MyNetDiagram</title>
</head>
<body>
    <form id="form1" runat="server">
      
        <ndiag:DiagramView id="DiagramView1" runat="server"  ClientSideMode="ImageMap">
      
        </ndiag:DiagramView>
   
        Sample NetDiagram
    </form>
</body>
</html>
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: EnableStyledText = true; not working
Reply #1 - Jul 30th, 2013 at 5:22pm
Print Post  
Hi,

You will also have to set n1.PolygonalTextLayout = true;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint