コード例 #1
0
		public ColumnHeader (string text, GridLength width ) : base ( width )
		{
			if (width.IsAuto)
				throw new NotImplementedException ("Auto");

			this.TextAlignment 	= TextAlignment.Left;
			this.Text 			= text;
			this.TextColor 		= Color.White;
		}
コード例 #2
0
ファイル: GridSplitter.cs プロジェクト: dfr0/moon
 /// <summary>
 /// Set the height/width of the given row/column 
 /// </summary> 
 private static void SetDefinitionLength(DefinitionAbstraction definition, GridLength length)
 { 
     if (definition.AsColumnDefinition != null)
     {
         definition.AsColumnDefinition.SetValue(ColumnDefinition.WidthProperty, length); 
     }
     else
     { 
         definition.AsRowDefinition.SetValue(RowDefinition.HeightProperty, length); 
     }
 } 
コード例 #3
0
ファイル: Grid.cs プロジェクト: diab0l/Granular
        // optimized measure for common usage
        private Size MeasureSingleCell(Size availableSize, GridLength width, GridLength height)
        {
            Size desiredSize = Size.Zero;
            availableSize = new Size(width.IsAbsolute ? width.Value : availableSize.Width, height.IsAbsolute ? height.Value : availableSize.Height);

            foreach (FrameworkElement child in Children)
            {
                child.Measure(availableSize);
                desiredSize = desiredSize.Max(child.DesiredSize);
            }

            return desiredSize;
        }
コード例 #4
0
ファイル: Grid.cs プロジェクト: diab0l/Granular
        // optimized arrange for common usage
        private Size ArrangeSingleCell(Size finalSize, GridLength width, GridLength height)
        {
            double finalWidth = width.IsAbsolute ? width.Value : finalSize.Width;
            double finalHeight = height.IsAbsolute ? height.Value : finalSize.Height;

            Rect finalRect = new Rect(finalWidth, finalHeight);

            foreach (FrameworkElement child in Children)
            {
                child.Arrange(finalRect);
            }

            return finalSize;
        }
コード例 #5
0
		public ColumnDefinition (GridLength width) : this ( width, null, null )
		{
		}
コード例 #6
0
		public ColumnDefinition (GridLength width, float? minWidth, float? maxWidth)
		{
			this.Width = width;
			this.MinWidth = minWidth;
			this.MaxWidth = maxWidth;
		}