void MapColumn(ListViewColumn col, Gtk.TreeViewColumn tc) { foreach (var v in col.Views) { CellUtil.CreateCellRenderer(this, tc, v); } }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { NSTableColumn tcol = (NSTableColumn)handle; switch (change) { case ListViewColumnChange.CanResize: tcol.ResizingMask = col.CanResize ? NSTableColumnResizing.UserResizingMask : NSTableColumnResizing.Autoresizing; break; case ListViewColumnChange.Cells: var c = CellUtil.CreateCell(ApplicationContext, Table, this, col.Views, cols.IndexOf(tcol)); c.Alignment = col.Alignment.ToNSTextAlignment(); tcol.DataCell = c; break; case ListViewColumnChange.Title: tcol.HeaderCell.Title = col.Title ?? string.Empty; if (!col.CanResize) { tcol.SizeToFit(); } break; case ListViewColumnChange.Alignment: tcol.HeaderCell.Alignment = col.Alignment.ToNSTextAlignment(); break; } }
public void UpdateColumn(ListViewColumn col) { Editable = true; var hc = new NSTableHeaderCell { Title = col.Title ?? string.Empty }; HeaderCell = hc; HeaderCell.Alignment = col.Alignment.ToNSTextAlignment(); DataView = CellUtil.CreateCellView(context, backend, col.Views, backend.Columns.IndexOf(this)); DataView.Identifier = Identifier; UpdateCachedViews(col.Views); if (col.CanResize) { ResizingMask |= NSTableColumnResizing.UserResizingMask; } else { ResizingMask &= ~NSTableColumnResizing.UserResizingMask; } if (col.Expands) { ResizingMask |= NSTableColumnResizing.Autoresizing; } else { ResizingMask &= ~NSTableColumnResizing.Autoresizing; } SizeToFit(); TableView?.InvalidateIntrinsicContentSize(); }
public void RemoveColumn(ListViewColumn col, object handle) { var tcol = (NSTableColumn)handle; cols.Remove(tcol); Table.RemoveColumn(tcol); }
public void UpdateColumn(ListViewColumn column, object handle, ListViewColumnChange change) { var col = ((GridViewColumn)handle); switch (change) { case ListViewColumnChange.Title: col.Header = column.Title; break; case ListViewColumnChange.Cells: var cellTemplate = CellUtil.CreateBoundColumnTemplate(Context, Frontend, column.Views); col.CellTemplate = new DataTemplate { VisualTree = cellTemplate }; int index = Tree.View.Columns.IndexOf(col); if (index == 0) { var dockFactory = CreateExpanderDock(); dockFactory.AppendChild(cellTemplate); col.CellTemplate.VisualTree = dockFactory; } break; case ListViewColumnChange.Alignment: var style = new Style(typeof(GridViewColumnHeader)); style.Setters.Add(new Setter(Control.HorizontalContentAlignmentProperty, Util.ToWpfHorizontalAlignment(column.Alignment))); col.HeaderContainerStyle = style; break; } }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { NSTableColumn tcol = (NSTableColumn)handle; var c = CellUtil.CreateCell(ApplicationContext, Table, this, col.Views, cols.IndexOf(tcol)); tcol.DataCell = c; }
void InitializeProjectsListView() { projectStore?.Clear(); // Recreate the list view each time. This is a workaround for the // list view not displaying items on re-populating if it has been sorted. if (projectsListView != null) { projectsListViewVBox.Remove(projectsListView); projectsListView.Dispose(); } projectStore?.Dispose(); projectCheckedField = new DataField <bool> (); projectNameField = new DataField <string> (); packageVersionField = new DataField <string> (); projectField = new DataField <ManageProjectViewModel> (); projectStore = new ListStore(projectCheckedField, projectNameField, packageVersionField, projectField); projectsListView = new ListView(); projectsListView.DataSource = projectStore; // Selected project check box column. if (projectCheckBoxCellView != null) { projectCheckBoxCellView.Toggled -= ProjectCheckBoxCellViewToggled; } projectCheckBoxCellView = new CheckBoxCellView(); projectCheckBoxCellView.ActiveField = projectCheckedField; projectCheckBoxCellView.Editable = true; projectCheckBoxCellView.Toggled += ProjectCheckBoxCellViewToggled; var column = new ListViewColumn(string.Empty, projectCheckBoxCellView); projectsListView.Columns.Add(column); // Project column. var textCellView = new TextCellView(); textCellView.TextField = projectNameField; column = new ListViewColumn(GettextCatalog.GetString("Project"), textCellView) { CanResize = true, SortDataField = projectNameField }; projectsListView.Columns.Add(column); // Package version column textCellView = new TextCellView(); textCellView.TextField = packageVersionField; column = new ListViewColumn(GettextCatalog.GetString("Version"), textCellView) { CanResize = true, SortDataField = packageVersionField }; projectsListView.Columns.Add(column); // Add list view to dialog. projectsListViewVBox.PackStart(projectsListView, true, true); }
public object AddColumn(ListViewColumn col) { var column = new GridViewColumn(); column.CellTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundColumnTemplate(Context, Frontend, col.Views) }; if (col.HeaderView != null) { column.HeaderTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundCellRenderer(Context, Frontend, col.HeaderView) } } ; else { column.Header = col.Title; } this.view.Columns.Add(column); MapColumn(col, column); return(column); }
void MapColumn(ListViewColumn col, Gtk.TreeViewColumn tc) { foreach (var v in col.Views) { CellUtil.CreateCellRenderer(ApplicationContext, this, tc, v, Widget.Model); } }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { Gtk.TreeViewColumn tc = (Gtk.TreeViewColumn)handle; if (change == ListViewColumnChange.Cells) { tc.Clear(); MapColumn(col, tc); } else if (change == ListViewColumnChange.Title) { MapTitle(col, tc); } else if (change == ListViewColumnChange.CanResize) { tc.Resizable = col.CanResize; } else if (change == ListViewColumnChange.SortDirection) { tc.SortOrder = (SortType)col.SortDirection; } else if (change == ListViewColumnChange.SortDataField) { tc.SortColumnId = col.SortDataField.Index; } else if (change == ListViewColumnChange.SortIndicatorVisible) { tc.SortIndicator = col.SortIndicatorVisible; } }
public void UpdateColumn(ListViewColumn column, object handle, ListViewColumnChange change) { var col = ((GridViewColumn)handle); switch (change) { case ListViewColumnChange.Title: col.Header = column.Title; break; case ListViewColumnChange.Cells: var cellTemplate = CellUtil.CreateBoundColumnTemplate(column.Views); col.CellTemplate = new DataTemplate { VisualTree = cellTemplate }; int index = Tree.View.Columns.IndexOf(col); if (index == 0) { var dockFactory = CreateExpanderDock(); dockFactory.AppendChild(cellTemplate); col.CellTemplate.VisualTree = dockFactory; } break; } }
public void AddColumn(ListViewColumn column) { foreach (CellView view in column.Views) { cellViews.Add(view); AddControlForView(view); } }
internal virtual ListViewCell this[ListViewColumn column] { get { var span = new HorizontalSpan(column.Bounds); return(Find(cell => !span.IsOutside(cell.Bounds))); } }
public void RemoveColumn(ListViewColumn column, object handle) { Tree.View.Columns.Remove((GridViewColumn)handle); foreach (var k in cellViews.Where(e => e.Value.Column == column).Select(e => e.Key).ToArray()) { cellViews.Remove(k); } }
public void AddColumn (ListViewColumn column) { foreach (CellView view in column.Views) { cellViews.Add (view); AddControlForView (view); } }
/// <summary> /// Adds a column to the list view. /// </summary> /// <param name="name">The name of the column.</param> /// <param name="width">The width of the column.</param> public void AddColumn(string name, int width) { ListViewColumn column = new ListViewColumn(); column.Name = name; column.Width = width; Columns.Add(column); }
public void AddColumn(ListViewColumn column) { foreach (CellView view in column.Views) { FrameworkElement elem = CellUtil.CreateCellRenderer(Node, view); DockPanel.Children.Add(elem); SWC.DockPanel.SetDock(elem, SWC.Dock.Left); } }
public object AddColumn(ListViewColumn col) { Gtk.TreeViewColumn tc = new Gtk.TreeViewColumn (); tc.Title = col.Title; Widget.AppendColumn (tc); MapTitle (col, tc); MapColumn (col, tc); return tc; }
public virtual NSTableColumn AddColumn(ListViewColumn col) { var tcol = new TableColumn(ApplicationContext, this, Table); cols.Add(tcol); tcol.UpdateColumn(col); Table.AddColumn(tcol); return(tcol); }
public object AddColumn(ListViewColumn col) { Gtk.TreeViewColumn tc = new Gtk.TreeViewColumn(); tc.Title = col.Title; Widget.AppendColumn(tc); MapTitle(col, tc); MapColumn(col, tc); return(tc); }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { var tcol = handle as TableColumn; if (tcol != null) { tcol.UpdateColumn(col, change); } }
void MapTitle(ListViewColumn col, Gtk.TreeViewColumn tc) { if (col.HeaderView == null) { tc.Title = col.Title; } else { var oldWidget = tc.Widget; tc.Widget = CellUtil.CreateCellRenderer(ApplicationContext, col.HeaderView); if (tc.Widget != null) { // lytic: added show; otherwise the header is not visible tc.Widget.Show(); if (oldWidget == null) // avoid to add events multiple times { tc.Clickable = true; var chk = tc.Widget as Gtk.CheckButton; if (chk != null) { tc.Clicked += (s, e) => chk.Click(); } else { tc.Clicked += (s, e) => { col.HeaderView.RaiseButtonPressed(new ButtonEventArgs { X = 0, Y = 0, Button = PointerButton.Left }); }; } } if (false) { // http://stackoverflow.com/questions/6960243/how-do-you-attach-a-popup-menu-to-a-column-header-button-in-gtk2-using-pygobject var top = tc.Widget; // not working: event never fired while (top.Parent != Widget) { top = top.Parent; top.AddEvents((int)Gdk.EventMask.ButtonPressMask); top.ButtonPressEvent += (s, e) => { col.HeaderView.RaiseButtonPressed(new ButtonEventArgs { X = e.Event.X, Y = e.Event.Y, Button = (PointerButton)e.Event.Button }); }; } } } } }
public override NSTableColumn AddColumn(ListViewColumn col) { NSTableColumn tcol = base.AddColumn(col); if (Tree.OutlineTableColumn == null) { Tree.OutlineTableColumn = tcol; } return(tcol); }
public void AddColumn(ListViewColumn column) { if (column == null) { throw new ArgumentNullException("column"); } column.Extender = this; _columns[column.ColumnIndex] = column; }
void MapTitle(ListViewColumn col, Gtk.TreeViewColumn tc) { if (col.HeaderView == null) { tc.Title = col.Title; } else { tc.Widget = CellUtil.CreateCellRenderer(ApplicationContext, col.HeaderView); } }
public object AddColumn(ListViewColumn column) { columns.Add(column); foreach (SWC.TreeViewItem item in Tree.Items) { ((MultiColumnTreeViewItem)item).AddColumn(column); } return(column); }
protected virtual void OnDrawSubItem(object sender, DrawListViewSubItemEventArgs e) { ListViewColumn column = GetColumn(e.ColumnIndex); if (column == null) { e.DrawDefault = true; return; } column.Draw(e); }
void AddTextColumn(DataField <string> dataField, string columnTitle) { var column = new ListViewColumn(); column.Title = columnTitle; var textViewCell = new TextCellView(); textViewCell.TextField = dataField; column.Views.Add(textViewCell); column.CanResize = true; listView.Columns.Add(column); }
protected virtual void OnMouseClick(object sender, MouseEventArgs e) { ListViewItem item; ListViewItem.ListViewSubItem sub; ListViewColumn column = GetColumnAt(e.X, e.Y, out item, out sub); if (column != null) { column.MouseClick(e, item, sub); } }
public object AddColumn(ListViewColumn column) { var col = new GridViewColumn(); UpdateColumn(column, col, ListViewColumnChange.Title); Tree.View.Columns.Add(col); UpdateColumn(column, col, ListViewColumnChange.Cells); return(col); }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { Gtk.TreeViewColumn tc = (Gtk.TreeViewColumn)handle; if (change == ListViewColumnChange.Cells) { tc.Clear(); MapColumn(col, tc); } else if (change == ListViewColumnChange.Title) { MapTitle(col, tc); } }
public void UpdateColumn(ListViewColumn col, ListViewColumnChange change) { if (TableView == null) { throw new InvalidOperationException("Add the column to a table first"); } switch (change) { case ListViewColumnChange.CanResize: if (col.CanResize) { ResizingMask |= NSTableColumnResizing.UserResizingMask; } else { ResizingMask &= ~NSTableColumnResizing.UserResizingMask; } break; case ListViewColumnChange.Expanding: if (col.Expands) { ResizingMask |= NSTableColumnResizing.Autoresizing; } else { ResizingMask &= ~NSTableColumnResizing.Autoresizing; } break; case ListViewColumnChange.Cells: DataView = CellUtil.CreateCellView(context, backend, col.Views, backend.Columns.IndexOf(this)); DataView.Identifier = Identifier; UpdateCachedViews(col.Views); TableView.ReloadData(); break; case ListViewColumnChange.Title: HeaderCell.Title = col.Title ?? string.Empty; if (!col.CanResize) { SizeToFit(); } break; case ListViewColumnChange.Alignment: HeaderCell.Alignment = col.Alignment.ToNSTextAlignment(); break; } }
public void RemoveColumn(ListViewColumn column, object handle) { Tree.View.Columns.Remove ((GridViewColumn) handle); foreach (var k in cellViews.Where (e => e.Value.Column == column).Select (e => e.Key).ToArray ()) cellViews.Remove (k); }
void MapTitle(ListViewColumn col, Gtk.TreeViewColumn tc) { if (col.HeaderView == null) tc.Title = col.Title; else tc.Widget = CellUtil.CreateCellRenderer (ApplicationContext, col.HeaderView); }
public void AddColumn(ListViewColumn column) { if (column == null) throw new ArgumentNullException("column"); column.Extender = this; _columns[column.ColumnIndex] = column; }
public void UpdateColumn(ListViewColumn column, object handle, ListViewColumnChange change) { var col = ((GridViewColumn) handle); switch (change) { case ListViewColumnChange.Title: col.Header = column.Title; break; case ListViewColumnChange.Cells: var cellTemplate = CellUtil.CreateBoundColumnTemplate (column.Views); col.CellTemplate = new DataTemplate { VisualTree = cellTemplate }; int index = Tree.View.Columns.IndexOf (col); if (index == 0) { var dockFactory = CreateExpanderDock (); dockFactory.AppendChild (cellTemplate); col.CellTemplate.VisualTree = dockFactory; } break; } }
void MapColumn(ListViewColumn col, Gtk.TreeViewColumn tc) { foreach (var v in col.Views) { CellUtil.CreateCellRenderer (ApplicationContext, this, tc, v, Widget.Model); } }
void MapColumn(ListViewColumn col, GridViewColumn handle) { foreach (var k in cellViews.Where(e => e.Value.Column == col).Select(e => e.Key).ToArray()) cellViews.Remove(k); var colindex = view.Columns.IndexOf(handle); for (int i = 0; i < col.Views.Count; i++) { var v = col.Views[i]; var cellindex = col.Views.IndexOf(v); cellViews[v] = new CellInfo { Column = col, CellIndex = cellindex, ColumnIndex = colindex }; } }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { var column = (GridViewColumn)handle; switch (change) { case ListViewColumnChange.Title: if (col.HeaderView != null) column.HeaderTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundCellRenderer(Context, Frontend, col.HeaderView) }; else column.Header = col.Title; if (col.HeaderView != null) column.HeaderTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundCellRenderer(Context, Frontend, col.HeaderView) }; else column.Header = col.Title; break; case ListViewColumnChange.Cells: column.CellTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundColumnTemplate(Context, Frontend, col.Views) }; break; case ListViewColumnChange.CanResize: break; case ListViewColumnChange.SortDirection: int colIndex = col.SortDataField.Index; (ListView.ItemsSource as ListDataSource).Sort(colIndex, col.SortDirection); break; case ListViewColumnChange.SortDataField: break; case ListViewColumnChange.SortIndicatorVisible: break; case ListViewColumnChange.Alignment: break; default: break; MapColumn(col, column); } }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { Gtk.TreeViewColumn tc = (Gtk.TreeViewColumn) handle; if (change == ListViewColumnChange.Cells) { tc.Clear (); MapColumn (col, tc); } else if (change == ListViewColumnChange.Title) MapTitle (col, tc); else if (change == ListViewColumnChange.CanResize) tc.Resizable = col.CanResize; else if (change == ListViewColumnChange.SortDirection) tc.SortOrder = (SortType)col.SortDirection; else if (change == ListViewColumnChange.SortDataField) tc.SortColumnId = col.SortDataField.Index; else if (change == ListViewColumnChange.SortIndicatorVisible) tc.SortIndicator = col.SortIndicatorVisible; }
public object AddColumn(ListViewColumn col) { Gtk.TreeViewColumn tc = new Gtk.TreeViewColumn (); tc.Title = col.Title; tc.Resizable = col.CanResize; tc.Alignment = col.Alignment.ToGtkAlignment (); tc.SortIndicator = col.SortIndicatorVisible; tc.SortOrder = (SortType)col.SortDirection; if (col.SortDataField != null) tc.SortColumnId = col.SortDataField.Index; Widget.AppendColumn (tc); MapTitle (col, tc); MapColumn (col, tc); return tc; }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { Gtk.TreeViewColumn tc = (Gtk.TreeViewColumn) handle; if (change == ListViewColumnChange.Cells) { tc.Clear (); MapColumn (col, tc); } else if (change == ListViewColumnChange.Title) MapTitle (col, tc); }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { Gtk.TreeViewColumn tc = (Gtk.TreeViewColumn) handle; switch (change) { case ListViewColumnChange.Cells: tc.Clear (); MapColumn (col, tc); break; case ListViewColumnChange.Title: MapTitle (col, tc); break; case ListViewColumnChange.CanResize: tc.Resizable = col.CanResize; break; case ListViewColumnChange.SortIndicatorVisible: tc.SortIndicator = col.SortIndicatorVisible; break; case ListViewColumnChange.SortDirection: tc.SortOrder = (SortType)col.SortDirection; break; case ListViewColumnChange.SortDataField: if (col.SortDataField != null) tc.SortColumnId = col.SortDataField.Index; break; case ListViewColumnChange.Alignment: tc.Alignment = col.Alignment.ToGtkAlignment (); break; } }
public override void FromXmlElement(System.Xml.XmlElement element, Dictionary<string, System.IO.MemoryStream> resources) { base.FromXmlElement(element, resources); foreach (System.Xml.XmlElement child in element.ChildNodes) { if (child.Name == "Columns") { foreach (System.Xml.XmlElement col in child.ChildNodes) { var c = new ListViewColumn(); c.Title = col.GetAttribute("title"); c.Width = (float)System.Xml.XmlConvert.ToDecimal(col.GetAttribute("width")); this.Columns.Add(c); } } else if (child.Name == "Items") { foreach (System.Xml.XmlElement item in child.ChildNodes) { var r = new ListViewRow(); foreach (System.Xml.XmlElement value in item.ChildNodes) { r.Values.Add(value.GetAttribute("value")); } this.Items.Add(r); } } } SerializationHelper.LoadBitmapFromResources(element, "backgroundNormal9P", resources, s => this.BackgroundNormal9P = s); SerializationHelper.LoadBitmapFromResources(element, "backgroundHeaderBar9P", resources, s => this.BackgroundHeaderBar9P = s); SerializationHelper.LoadBitmapFromResources(element, "backgroundColumnHeader9P", resources, s => this.BackgroundColumnHeader9P = s); SerializationHelper.LoadBitmapFromResources(element, "backgroundRowOver9P", resources, s => this.BackgroundRowOver9P = s); SerializationHelper.LoadBitmapFromResources(element, "backgroundRowSelected9P", resources, s => this.BackgroundRowSelected9P = s); SerializationHelper.LoadBitmapFromResources(element, "backgroundRowSelectedOver9P", resources, s => this.BackgroundRowSelectedOver9P = s); SerializationHelper.LoadBitmapFromResources(element, "backgroundRowNormal9P", resources, s => this.BackgroundRowNormal9P = s); SerializationHelper.LoadBitmapFromResources(element, "scrollbarNormal9P", resources, s => this.ScrollbarNormal9P = s); SerializationHelper.LoadFont(element, "headerFont", s => this.HeaderFont = s); SerializationHelper.LoadColor(element, "headerForeColor", s => this.HeaderForeColor = s); SerializationHelper.LoadFont(element, "activeRowFont", s => this.ActiveRowFont = s); SerializationHelper.LoadColor(element, "activeRowForeColor", s => this.ActiveRowForeColor = s); //SerializationHelper.LoadInteger(element, "activeRow", s => { if (s >= 0 && s < this.items.Count) this.ActiveRow = this.items[s]; else this.activeRow = null; }); }
void MapColumn(ListViewColumn col, Gtk.TreeViewColumn tc) { foreach (var v in col.Views) { CellUtil.CreateCellRenderer (this, tc, v); } }
public void RemoveColumn(ListViewColumn column, object handle) { Tree.View.Columns.Remove ((GridViewColumn) handle); }
public void RemoveColumn(ListViewColumn col, object handle) { Widget.RemoveColumn ((Gtk.TreeViewColumn)handle); }
public void UpdateColumn(ListViewColumn column, object handle, ListViewColumnChange change) { var col = ((GridViewColumn) handle); switch (change) { case ListViewColumnChange.Title: col.Header = column.Title; break; case ListViewColumnChange.Cells: var cellTemplate = CellUtil.CreateBoundColumnTemplate(Context, Frontend, column.Views); col.CellTemplate = new DataTemplate { VisualTree = cellTemplate }; int index = Tree.View.Columns.IndexOf (col); if (index == 0) { var dockFactory = CreateExpanderDock (); dockFactory.AppendChild (cellTemplate); col.CellTemplate.VisualTree = dockFactory; } MapColumn (column, col); break; case ListViewColumnChange.Alignment: var style = new Style(typeof(GridViewColumnHeader)); style.Setters.Add(new Setter(Control.HorizontalContentAlignmentProperty, Util.ToWpfHorizontalAlignment(column.Alignment))); col.HeaderContainerStyle = style; break; } }
void MapColumn(ListViewColumn col, Gtk.TreeViewColumn tc) { foreach (var k in cellViews.Where (e => e.Value.Column == tc).Select (e => e.Key).ToArray ()) cellViews.Remove (k); foreach (var v in col.Views) { var r = CellUtil.CreateCellRenderer (ApplicationContext, Frontend, this, tc, v); cellViews [v] = new CellInfo { Column = tc, Renderer = r }; } }
public object AddColumn(ListViewColumn col) { var column = new GridViewColumn (); column.CellTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundColumnTemplate (Frontend, col.Views) }; if (col.HeaderView != null) column.HeaderTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundCellRenderer (Frontend, col.HeaderView) }; else column.Header = col.Title; this.view.Columns.Add (column); return column; }
public void RemoveColumn(ListViewColumn col, object handle) { this.view.Columns.Remove ((GridViewColumn) handle); }
public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change) { var column = (GridViewColumn) handle; column.CellTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundColumnTemplate(Frontend, col.Views) }; if (col.HeaderView != null) column.HeaderTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundCellRenderer(Frontend, col.HeaderView) }; else column.Header = col.Title; }
public object AddColumn(ListViewColumn col) { var column = new GridViewColumn(); column.CellTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundColumnTemplate(Context, Frontend, col.Views) }; if (col.HeaderView != null) column.HeaderTemplate = new DataTemplate { VisualTree = CellUtil.CreateBoundCellRenderer(Context, Frontend, col.HeaderView) }; else { GridViewColumnHeader header = new GridViewColumnHeader(); headerAndColumnPairs.Add(header, column); header.Content = col.Title; header.Click += Header_Click; column.Header = header; } this.view.Columns.Add(column); MapColumn(col, column); return column; }
public object AddColumn(ListViewColumn column) { var col = new GridViewColumn (); UpdateColumn (column, col, ListViewColumnChange.Title); Tree.View.Columns.Add (col); UpdateColumn (column, col, ListViewColumnChange.Cells); return col; }