public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { //1. var element = new CustomContainerRenderBox(rootgfx, this.Width, this.Height); element.SetLocation(this.Left, this.Top); element.BackColor = this.backColor; element.SetController(this); // listItemText = new CustomTextRun(rootgfx, 200, this.Height); if (font != null) { listItemText.RequestFont = font; //TODO: review how to find int blankLineHeight = (int)rootgfx.TextServices.MeasureBlankLineHeight(font); listItemText.SetHeight(blankLineHeight); element.SetHeight(blankLineHeight); } element.AddChild(listItemText); listItemText.TransparentForAllEvents = true; if (this.itemText != null) { listItemText.NeedClipArea = true; listItemText.Text = this.itemText; } element.NeedClipArea = true; this.primElement = element; } return(primElement); }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { //1. var element = new CustomContainerRenderBox(rootgfx, this.Width, this.Height); element.SetLocation(this.Left, this.Top); element.BackColor = this.backColor; element.SetController(this); listItemText = new CustomTextRun(rootgfx, 200, this.Height); element.AddChild(listItemText); listItemText.TransparentForAllEvents = true; if (this.itemText != null) { listItemText.Text = this.itemText; } this.primElement = element; } return(primElement); }
public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx) { if (primElement == null) { //1. var element = new CustomContainerRenderBox(rootgfx, this.Width, this.Height); element.SetLocation(this.Left, this.Top); element.BackColor = this.backColor; element.SetController(this); listItemText = new CustomTextRun(rootgfx, 200, this.Height); element.AddChild(listItemText); listItemText.TransparentForAllEvents = true; if (this.itemText != null) { listItemText.Text = this.itemText; } this.primElement = element; } return primElement; }