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

C# ColumnDefinition类代码示例

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

本文整理汇总了C#中ColumnDefinition的典型用法代码示例。如果您正苦于以下问题:C# ColumnDefinition类的具体用法?C# ColumnDefinition怎么用?C# ColumnDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ColumnDefinition类属于命名空间,在下文中一共展示了ColumnDefinition类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: write_column_for_widths

        public void write_column_for_widths()
        {
            var column = new ColumnDefinition<ColumnDefTarget, string>(FieldType.column, x => x.Name);
            column.Width(100, 80, 120);

            writeColumn(column).ShouldContain("width: 100, minWidth: 80, maxWidth: 120");
        }
开发者ID:JordanZaerr,项目名称:FubuMVC.SlickGrid,代码行数:7,代码来源:ColumnDefinitionTester.cs


示例2: override_id

        public void override_id()
        {
            var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name);
            column.Id("else");

            writeColumn(column).ShouldEqual("{name: \"Name\", field: \"Name\", id: \"else\", sortable: true}");
        }
开发者ID:ketiko,项目名称:fubumvc,代码行数:7,代码来源:ColumnDefinitionTester.cs


示例3: DataGridLengthEditorGrid

        public DataGridLengthEditorGrid()
        {
            this.ColumnDefinitions.Add(new ColumnDefinition());
            ColumnDefinition columnDefinition = new ColumnDefinition();
            columnDefinition.Width = GridLength.Auto;
            this.ColumnDefinitions.Add(columnDefinition);

            _textBox = new TextBox();
            Binding binding = new Binding("Text");
            binding.Mode = BindingMode.TwoWay;
            _textBox.SetBinding(TextBox.TextProperty, binding);
            _textBox.KeyDown += new KeyEventHandler(TextBox_KeyDown);
            _textBox.DataContext = this;
            this.Children.Add(_textBox);

            _comboBox = new ComboBox();
            _comboBox.SetValue(Grid.ColumnProperty, 1);
            // Unfortunately, there's no built in way to tell the ComboBox to be as wide as the widest item
            _comboBox.MinWidth = 95; 
            _comboBox.SelectionChanged += new SelectionChangedEventHandler(ComboBox_SelectionChanged);
            DataGridLengthUnitType[] items = 
            {
                DataGridLengthUnitType.Auto,
                DataGridLengthUnitType.Pixel,
                DataGridLengthUnitType.SizeToCells,
                DataGridLengthUnitType.SizeToHeader
            };
            _comboBox.ItemsSource = items;
            this.Children.Add(_comboBox);
        }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:30,代码来源:DataGridLengthEditorGrid.cs


示例4: Equals

 public override bool Equals(ColumnDefinition other)
 {
     if (!base.Equals(other)) return false;
     var otherInteger = (IntegerColumnDefinition)other;
     if (IdentitySeed != otherInteger.IdentitySeed) return false;
     return true;
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:7,代码来源:IntegerColumnDefinition.cs


示例5: override_title

        public void override_title()
        {
            var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name);
            column.Title("else");

            writeColumn(column).ShouldContain("name: \"else\"");
        }
开发者ID:ketiko,项目名称:fubumvc,代码行数:7,代码来源:ColumnDefinitionTester.cs


示例6: VerticalLayout

            /**
             * The constructor
             */
            public VerticalLayout()
            {
                mGrid = new System.Windows.Controls.Grid();

                mColDef = new ColumnDefinition();
                mSpacerUp = new RowDefinition();
                mSpacerDown = new RowDefinition();

                mSpacerRight = new ColumnDefinition();
                mSpacerLeft = new ColumnDefinition();

                mColDef.Width = new System.Windows.GridLength(1, System.Windows.GridUnitType.Star);

                mSpacerUp.Height = new System.Windows.GridLength(0);
                mSpacerDown.Height = new System.Windows.GridLength(0);
                mSpacerRight.Width = new System.Windows.GridLength(0);
                mSpacerLeft.Width = new System.Windows.GridLength(0);

                mGrid.RowDefinitions.Add(mSpacerUp);
                mGrid.RowDefinitions.Add(mSpacerDown);

                mGrid.ColumnDefinitions.Add(mSpacerLeft);
                mGrid.ColumnDefinitions.Add(mColDef);
                mGrid.ColumnDefinitions.Add(mSpacerRight);

                this.fillSpaceVerticalyEnabled = false;
                this.fillSpaceHorizontalyEnabled = false;

                mView = mGrid;
                #if DEBUG
                mGrid.ShowGridLines = true;
                #endif
            }
开发者ID:patrickbroman,项目名称:MoSync,代码行数:36,代码来源:MoSyncVerticalLayout.cs


示例7: AddPages

    public static void AddPages(TabControl tabControl, string tabName, bool maxSize, params Page[] pages)
    {
        Grid grid = new Grid();
        grid.Width = double.NaN;
        grid.Height = double.NaN;
        grid.Margin = new Thickness(0);
        grid.VerticalAlignment = VerticalAlignment.Top;

        if (maxSize)
        {
            grid.HorizontalAlignment = HorizontalAlignment.Stretch;
            grid.VerticalAlignment = VerticalAlignment.Stretch;
        }

        int index = 0;
        foreach (var item in pages)
        {
            ColumnDefinition col = new ColumnDefinition();
            col.Width = GridLength.Auto;
            grid.ColumnDefinitions.Add(col);
            SetPageToGrid(item, grid, 0, index);
            index++;
        }

        TabItem tabItem = new TabItem();
        tabItem.Header = tabName;
        tabItem.Content = grid;
        tabControl.Items.Add(tabItem);
    }
开发者ID:vesteksoftware,项目名称:Onyang_4L_3rd_Line_VT5080,代码行数:29,代码来源:UIUtility.cs


示例8: SharedSizeGroup

		public void SharedSizeGroup ()
		{
			ColumnDefinition c = new ColumnDefinition ();
			Assert.IsNull (c.SharedSizeGroup, "1");
			try {
				c.SharedSizeGroup = string.Empty;
				Assert.Fail ("2");
			} catch (ArgumentException) {
			}
			try {
				c.SharedSizeGroup = " ";
				Assert.Fail ("3");
			} catch (ArgumentException) {
			}
			try {
				c.SharedSizeGroup = ".";
				Assert.Fail ("4");
			} catch (ArgumentException) {
			}
			try {
				c.SharedSizeGroup = "1";
				Assert.Fail ("5");
			} catch (ArgumentException) {
			}
			c.SharedSizeGroup = "_";
			c.SharedSizeGroup = "A";
			c.SharedSizeGroup = "A1";
			c.SharedSizeGroup = null;
			Assert.IsNotNull (DefinitionBase.SharedSizeGroupProperty.ValidateValueCallback, "6");
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:30,代码来源:DefinitionBaseTest.cs


示例9: ColumnOrderSet

 public ColumnOrderSet(ColumnDefinition column, ListSortDirection order)
     : this()
 {
     column.ThrowIfNull("column");
     this.Column = column;
     this.Direction = order;
 }
开发者ID:catwalkagogo,项目名称:Heron,代码行数:7,代码来源:ColumnOrderDefinition.cs


示例10: Equals

 public override bool Equals(ColumnDefinition other)
 {
     if (!base.Equals(other)) return false;
     var otherSize = (VariableSizeColumnDefinition)other;
     if (IsMaximumSize && otherSize.IsMaximumSize) return true;
     if (Size != otherSize.Size) return false;
     return true;
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:8,代码来源:VariableSizeColumnDefinition.cs


示例11: will_not_write_a_null_property_because_that_wigs_out_at_runtime

        public void will_not_write_a_null_property_because_that_wigs_out_at_runtime()
        {
            var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name, theProjection);
            column.Property("something", null);

            // just wanna see it not blow up
            writeColumn(column);
        }
开发者ID:kharlamov,项目名称:FubuMVC.SlickGrid,代码行数:8,代码来源:ColumnDefinitionTester.cs


示例12: FixedLengthTokenizer

 public FixedLengthTokenizer(ColumnDefinition[] columns)
 {
     if (columns == null)
     {
         throw new ArgumentNullException("columns");
     }
     Columns = columns;
 }
开发者ID:bytefish,项目名称:TinyCsvParser,代码行数:8,代码来源:FixedLengthTokenizer.cs


示例13: Equals

 public override bool Equals(ColumnDefinition other)
 {
     if (!base.Equals(other)) return false;
     var otherDecimal = (DecimalColumnDefinition)other;
     if (Precision != otherDecimal.Precision) return false;
     if (Scale != otherDecimal.Scale) return false;
     return true;
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:8,代码来源:DecimalColumnDefinition.cs


示例14: CreateColumn

        /// <summary>
        /// Add a new column to the table.
        /// </summary>
        /// <param name="columndef">The column definition.</param>
        /// <returns>The table the column was added to.</returns>
        public override Table CreateColumn(ColumnDefinition columndef)
        {
            this.Tracer.TraceInfo("adding column {0} of type {1}", columndef.Name, columndef.Type);
            columndef.CreateColumn(this.TableCursor);

            // The meta-data has changed. Reload it.
            this.LoadMetaData();
            return this;
        }
开发者ID:jtmueller,项目名称:ravendb,代码行数:14,代码来源:ReadWriteTable.cs


示例15: GetFormattedColumnLine

 private string GetFormattedColumnLine(ColumnDefinition column)
 {
     return string.Format(
         "[{0}] {1}{2}{3}",
         column.Name,
         GetFormattedDataType(column),
         GetFormattedIdentity(column),
         GetFormattedNullable(column));
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:9,代码来源:TableCreateSqlGenerator.cs


示例16: AddColumn

 public override void AddColumn(ColumnDefinition columnDef)
 {
     using (var transaction = new Transaction(connection.session))
      using (var table = new Microsoft.Isam.Esent.Interop.Table(connection.session, connection.dbid, name, OpenTableGrbit.None)) {
          var tableCreator = new EseTableCreator(connection);
          tableCreator.AddColumn(table, columnDef);
          transaction.Commit(CommitTransactionGrbit.None);
      }
      RefreshTableInfo();
 }
开发者ID:purplecow,项目名称:simplestorageengine,代码行数:10,代码来源:EseTable.cs


示例17: Extended

 private static string Extended(ColumnDefinition column)
 {
     var sizeColumn = column as VariableSizeColumnDefinition;
     if (sizeColumn != null) return string.Format(", {0} = {1}", nameof(sizeColumn.Size), sizeColumn.Size);
     var integerColumn = column as IntegerColumnDefinition;
     if (integerColumn != null && integerColumn.IdentitySeed.HasValue) return string.Format(", {0} = {1}", nameof(integerColumn.IdentitySeed), integerColumn.IdentitySeed);
     var decimalColumn = column as DecimalColumnDefinition;
     if (decimalColumn != null) return string.Format(", {0} = {1}, {2} = {3}", nameof(decimalColumn.Precision), decimalColumn.Precision, nameof(decimalColumn.Scale), decimalColumn.Scale);
     return null;
 }
开发者ID:andywilsonuk,项目名称:IntegrationTestingLibraryForSqlServer,代码行数:10,代码来源:TableCodeBuilder.cs


示例18: ProcessColumnDefinition

        public void ProcessColumnDefinition(ColumnDefinition ColumnDef)
        {
            _smells.ProcessTsqlFragment(ColumnDef.DataType);
            foreach (var Constraint in ColumnDef.Constraints)
            {

                _smells.ProcessTsqlFragment(Constraint);
            }
           
        }
开发者ID:dalehhirt,项目名称:TSQL-Smells,代码行数:10,代码来源:ColumnDefinitionProcessor.cs


示例19: CreateTable

        public static void CreateTable(DataManagement.Configuration config, string tablePrefix = "")
        {
            var columns = new ColumnDefinition[]
            {
                new ColumnDefinition("Variable", DataType.LargeText),
                new ColumnDefinition("Value", DataType.LargeText),
                new ColumnDefinition("Timestamp", DataType.DateTime)
            };

            Table.Create(config, tablePrefix + Names.Variables, columns, primaryKey);
        }
开发者ID:TrakHound,项目名称:TrakHound-Community,代码行数:11,代码来源:Variables.cs


示例20: Visit

        public override void Visit(ColumnDefinition col)
        {
            String s = "<COL id='" + col.ColumnIdentifier.Value + "'";
            SqlDataTypeReference dt = (SqlDataTypeReference)col.DataType;

            s = s + " type='" + dt.SqlDataTypeOption + "'></COL>";
            sw.WriteLine(s);

            col.Accept(new NullVisitor());

        }
开发者ID:Khalefa,项目名称:TSQL,代码行数:11,代码来源:SQlVisitor.cs



注:本文中的ColumnDefinition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ColumnExpression类代码示例发布时间:2022-05-24
下一篇:
C# ColumnCollection类代码示例发布时间: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