public override void BeginElement(UIElement ui, string uiname) { var newElement = xmldoc.CreateElement(uiname); elementStack.Push(currentElement); currentElement.AppendChild(newElement); currentElement = newElement; uiStacks.Push(ui); }
public void AddUI(UIElement ui) { #if DEBUG if (this.owner == ui) throw new Exception("cyclic!"); #endif ui.ParentUI = this.owner; uiList.Add(ui); }
static void SerializeDzImageBox(DzBoxSerializer writer, UIElement ui) { ui.Walk(writer); //writer.BeginElement("imgbox"); //var holder = ui as UIHolderBox; //var imgBox = holder.TargetBox as LayoutFarm.CustomWidgets.ImageBox; //writer.AddAttribute("left", (holder.Left + holder.HolderBorder).ToString()); //writer.AddAttribute("top", (holder.Top + holder.HolderBorder).ToString()); //writer.AddAttribute("width", imgBox.Width.ToString()); //writer.AddAttribute("height", imgBox.Height.ToString()); ////info about image //writer.AddAttribute("imgsrc", imgBox.ImageBinder.ImageSource); //writer.EndElement(); }
static void SerializeDzTextBox(DzBoxSerializer writer, UIElement ui) { ui.Walk(writer); }
public static void AddContent(this SampleViewport viewport, UIElement ui) { viewport.ViewportControl.AddContent( ui.GetPrimaryRenderElement(viewport.ViewportControl.RootGfx), ui); }
static void SerializeCkAwareBox(DzBoxSerializer visitor, UIElement ui) { var holder = ui as UIHolderBox; //serialize content of this panel holder.Walk(visitor); }
static MyUIElement Wrap(LayoutFarm.UI.UIElement ui) { return(new MyUIElement(ui)); }
public MyUIElement(UI.UIElement uiElem) { this.uiElem = uiElem; }
public void RemoveChild(UIElement ui) { needContentLayout = true; this.uiList.RemoveUI(ui); if (this.HasReadyRenderElement) { if (this.ContentLayoutKind != BoxContentLayoutKind.Absolute) { this.InvalidateLayout(); } this.primElement.RemoveChild(ui.CurrentPrimaryRenderElement); } }
public void AddChild(UIElement ui) { if (this.uiList == null) { this.uiList = new UICollection(this); } needContentLayout = true; this.uiList.AddUI(ui); if (this.HasReadyRenderElement) { primElement.AddChild(ui); if (this.panelLayoutKind != BoxContentLayoutKind.Absolute) { this.InvalidateLayout(); } } if (ui.NeedContentLayout) { ui.InvalidateLayout(); } }
public bool RemoveUI(UIElement ui) { //remove specific ui return uiList.Remove(ui); }
public UICollection(UIElement owner) { this.owner = owner; }
public static void AddChild(this RenderElement renderBox, UIElement ui) { renderBox.AddChild(ui.GetPrimaryRenderElement(renderBox.Root)); }
public void SetContent(int r, int c, UIElement ui) { gridLayer.GetCell(r, c).ContentElement = ui.GetPrimaryRenderElement(this.Root); }
public void AddUI(UIElement ui, int rowIndex, int colIndex) { if (rowIndex < gridTable.RowCount && colIndex < gridTable.ColumnCount) { gridTable.GetCell(rowIndex, colIndex).ContentElement = ui; if (this.gridBoxRenderE != null) { gridBoxRenderE.SetContent(rowIndex, colIndex, ui.GetPrimaryRenderElement(gridBoxRenderE.Root)); } } }