当前位置: 首页>>代码示例>>C#>>正文


C# ColumnDefinition类代码示例

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


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


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