div で構成される UserControl を作成したいと考えています。div の内側には、SVG でレンダリングされた多数のボックスがあります。データから決定されるボックスの数とそれらの相対位置。
データは、クラス Box のリストの形式になります。Box は次のとおりです。
public class SVGBox
{
public int x { get; set; } // x coordinate of a corner
public int y { get; set; } // x coordinate of same corner
public int l { get; set; } // length
public int h { get; set; } // height
public string Color { get; set; }
public string text { get; set; }
public string uniqueKey { get; set; }
public SVGBox (int X, int Y, int H, int W, string Text, string Key )
{
x = X;
y = Y;
h = H;
w = W;
text = Text;
uniqueKey = Key;
}
}
C# から SVG をレンダリングするために 'Net で見つけた例がありますが、DOCTYPE で特定の参照を使用して HTML ページ全体を書き出す必要があります。ユーザーコントロール内でこれを行うにはどうすればよいですか?