本文整理汇总了C#中ListViewColumn类的典型用法代码示例。如果您正苦于以下问题:C# ListViewColumn类的具体用法?C# ListViewColumn怎么用?C# ListViewColumn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListViewColumn类属于命名空间,在下文中一共展示了ListViewColumn类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddColumn
public void AddColumn (ListViewColumn column)
{
foreach (CellView view in column.Views)
{
cellViews.Add (view);
AddControlForView (view);
}
}
开发者ID:m13253,项目名称:xwt,代码行数:8,代码来源:MultiColumnTreeViewItem.cs
示例2: AddColumn
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;
}
开发者ID:chkn,项目名称:xwt,代码行数:9,代码来源:TableViewBackend.cs
示例3: AddColumn
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;
}
开发者ID:jfreax,项目名称:xwt,代码行数:13,代码来源:ListViewBackend.cs
示例4: MapColumn
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
};
}
}
开发者ID:steffenWi,项目名称:xwt,代码行数:16,代码来源:ListViewBackend.cs
示例5: MapColumn
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
};
}
}
开发者ID:modulexcite,项目名称:xwt,代码行数:12,代码来源:TableViewBackend.cs
示例6: RemoveColumn
public void RemoveColumn(ListViewColumn col, object handle)
{
Widget.RemoveColumn ((Gtk.TreeViewColumn)handle);
}
开发者ID:modulexcite,项目名称:xwt,代码行数:4,代码来源:TableViewBackend.cs
示例7: MapColumn
void MapColumn(ListViewColumn col, Gtk.TreeViewColumn tc)
{
foreach (var v in col.Views) {
CellUtil.CreateCellRenderer (this, tc, v);
}
}
开发者ID:RevolutionSmythe,项目名称:xwt,代码行数:6,代码来源:TableViewBackend.cs
示例8: AddColumn
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;
}
开发者ID:jbeaurain,项目名称:xwt,代码行数:12,代码来源:TreeViewBackend.cs
示例9: UpdateColumn
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;
}
开发者ID:nbros,项目名称:xwt,代码行数:18,代码来源:TableViewBackend.cs
示例10: MapColumn
void MapColumn(ListViewColumn col, Gtk.TreeViewColumn tc)
{
foreach (var v in col.Views) {
CellUtil.CreateCellRenderer (ApplicationContext, this, tc, v, Widget.Model);
}
}
开发者ID:nbros,项目名称:xwt,代码行数:6,代码来源:TableViewBackend.cs
示例11: UpdateColumn
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;
}
}
开发者ID:akrisiun,项目名称:xwt,代码行数:31,代码来源:TreeViewBackend.cs
示例12: RemoveColumn
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);
}
开发者ID:akrisiun,项目名称:xwt,代码行数:6,代码来源:TreeViewBackend.cs
示例13: FromXmlElement
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; });
}
开发者ID:JackWangCUMT,项目名称:SkinnableUI,代码行数:45,代码来源:ListView.cs
示例14: RemoveColumn
public void RemoveColumn(ListViewColumn col, object handle)
{
this.view.Columns.Remove ((GridViewColumn) handle);
}
开发者ID:jfreax,项目名称:xwt,代码行数:4,代码来源:ListViewBackend.cs
示例15: RemoveColumn
public void RemoveColumn(ListViewColumn column, object handle)
{
Tree.View.Columns.Remove ((GridViewColumn) handle);
}
开发者ID:jbeaurain,项目名称:xwt,代码行数:4,代码来源:TreeViewBackend.cs
示例16: UpdateColumn
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;
}
开发者ID:jfreax,项目名称:xwt,代码行数:9,代码来源:ListViewBackend.cs
示例17: UpdateColumn
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;
}
}
开发者ID:jbeaurain,项目名称:xwt,代码行数:24,代码来源:TreeViewBackend.cs
示例18: UpdateColumn
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);
}
开发者ID:RevolutionSmythe,项目名称:xwt,代码行数:10,代码来源:TableViewBackend.cs
示例19: AddColumn
/// <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);
}
开发者ID:adamlin1970,项目名称:NetmfSTM32,代码行数:13,代码来源:FileSystemSample.cs
示例20: AddColumn
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;
}
开发者ID:modulexcite,项目名称:xwt,代码行数:15,代码来源:TableViewBackend.cs
注:本文中的ListViewColumn类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论