• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ListViewColumn类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ListViewColumnSorter类代码示例发布时间:2022-05-24
下一篇:
C# ListView类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap