public CarViewElement() { InitStyles(); _img.Size = new Size(130, 130); // first column var cp1 = new ColumnPanel(); cp1.Children.Add(_img); cp1.Children.Add(_colors); // second column var cp2 = new ColumnPanel(); cp2.Children.Add(_model); cp2.Children.Add(_brand); cp2.Children.Add(_liter); cp2.Children.Add(_transmiss); cp2.Children.Add(_category); // third column var cp3 = new ColumnPanel(); cp3.Children.Add(_price); cp3.Children.Add(_count); // row with three columns Children.Add(cp1); Children.Add(cp2); Children.Add(cp3); }
/// <summary> /// Display current AutomaticSourcingSheet elements to Ui. /// </summary> /// <param name="automaticSourcingSheet"></param> public void Display(AutomaticSourcingSheet automaticSourcingSheet) { throwChange = false; this.AutomaticSourcingSheet = automaticSourcingSheet != null ? automaticSourcingSheet : this.AutomaticSourcingSheet; nameSheetTextBox.Text = this.AutomaticSourcingSheet != null ? this.AutomaticSourcingSheet.Name : ""; FirstRowNameCheckBox.IsChecked = automaticSourcingSheet != null ? this.AutomaticSourcingSheet.firstRowColumn: false; RangeTextBox.Text = this.AutomaticSourcingSheet != null && this.AutomaticSourcingSheet.rangeSelected != null && RangeCheckBox.IsChecked.HasValue ? this.AutomaticSourcingSheet.rangeSelected.Name : ""; List <AutomaticSourcingColumn> listeToSend = automaticSourcingSheet != null && this.AutomaticSourcingSheet.listColumnToDisplay != null ? this.AutomaticSourcingSheet.listColumnToDisplay : null; FillListColumns(listeToSend); if (this.AutomaticSourcingSheet != null && this.AutomaticSourcingSheet.ActiveColumn == null) { if (listeToSend != null && listeToSend.Count > 0) { this.AutomaticSourcingSheet.ActiveColumn = this.AutomaticSourcingSheet.getFirstInList(); } } ColumnPanel.Display(this.AutomaticSourcingSheet != null ? this.AutomaticSourcingSheet.ActiveColumn : null, listeToSend); throwChange = true; }
public CategoryCustomNode() { // level 0 // init text elements // name _name = new TextElement(); _name.Style = new Style(); // description _description = new TextElement(); _description.Style = new Style(); _description.Width = 120; // init image element _img = new ImageElement(); _img.Style = new Style(); _img.Size = new Size(70, 50); // init a grid for text elements var cp = new ColumnPanel(); cp.Children.Add(_name); cp.Children.Add(_description); // init panel for image _rw = new RowPanel(); _rw.Children.Add(cp); _rw.Children.Add(_img); _rw.Style = new Style(); _rw.Style.VerticalAlignment = Alignment.Center; // level 1 _product = new TextElement(); _product.Style = new Style(); }
/// <summary> /// Initializes a new instance of the <see cref="ColumnPanelColumnsCollection"/> class. /// </summary> /// <param name="parent">The parent.</param> public ColumnPanelColumnsCollection(ColumnPanel parent) => _parent = parent;