Beispiel #1
0
		private void InitRedBox()
		{
			var styles = new AssembledStyles();
			RootBox root = new RootBoxFdo(styles);
			var block = new BlockBox(styles, Color.Red, 72000, 36000);
			root.AddBox(block);
			theSharpView.Root = root;
		}
Beispiel #2
0
		private void InitSeveralBoxes()
		{
			var styles = new AssembledStyles();
			RootBox root = new RootBoxFdo(styles);
			var items = new List<IClientRun>();
			items.Add(new BlockBox(styles, Color.Red, 72000, 36000));
			items.Add(new BlockBox(styles, Color.Blue, 36000, 18000));
			items.Add(new BlockBox(styles, Color.Orange, 18000, 36000));
			items.Add(new BlockBox(styles, Color.Green, 72000, 18000));
			items.Add(new ImageBox(styles.WithBackColor(Color.Pink).WithBorderColor(Color.Blue)
				.WithBorders(new Thickness(2.0)).WithPads(new Thickness(4.0)), new Icon(SystemIcons.Shield, 40, 40).ToBitmap()));
			items.Add(new BlockBox(styles, Color.Yellow, 72000, 36000));
			var source = new TextSource(items);
			var para = new ParaBox(styles, source);
			root.AddBox(para);
			theSharpView.Root = root;
		}