This topic has not yet been rated - Rate this topic

DataGridLength Structure

Represents the lengths of elements within the DataGrid control.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
[TypeConverterAttribute(typeof(DataGridLengthConverter))]
public struct DataGridLength : IEquatable<DataGridLength>

The DataGridLength type exposes the following members.

  Name Description
Public method DataGridLength(Double) Initializes a new instance of the DataGridLength class with an absolute value in pixels.
Public method DataGridLength(Double, DataGridLengthUnitType) Initializes a new instance of the DataGridLength class with a specified value and unit.
Public method DataGridLength(Double, DataGridLengthUnitType, Double, Double) Initializes a new instance of the DataGridLength class with the specified value, unit, desired value, and display value.
Top
  Name Description
Public property Static member Auto Gets a DataGridLength structure that represents the standard automatic sizing mode.
Public property DesiredValue Gets the calculated pixel value needed for the element.
Public property DisplayValue Gets the pixel value allocated for the size of the element.
Public property IsAbsolute Gets a value that indicates whether this instance sizes elements based on a fixed pixel value.
Public property IsAuto Gets a value that indicates whether this instance automatically sizes elements based on both the content of cells and the column headers.
Public property IsSizeToCells Gets a value that indicates whether this instance automatically sizes elements based on the content of the cells.
Public property IsSizeToHeader Gets a value that indicates whether this instance automatically sizes elements based on the header.
Public property IsStar Gets a value that indicates whether this instance automatically sizes elements based on a weighted proportion of available space.
Public property Static member SizeToCells Gets a DataGridLength structure that represents the cell-based automatic sizing mode.
Public property Static member SizeToHeader Gets a DataGridLength structure that represents the header-based automatic sizing mode.
Public property UnitType Gets the type that is used to determine how the size of the element is calculated.
Public property Value Gets the absolute value of the DataGridLength in pixels.
Top
  Name Description
Public method Equals(DataGridLength) Determines whether the specified DataGridLength is equal to the current DataGridLength.
Public method Equals(Object) Determines whether the specified object is equal to the current DataGridLength. (Overrides ValueType.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Gets a hash code for the DataGridLength. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Overrides ValueType.ToString().)
Top
  Name Description
Public operator Static member Equality Compares two DataGridLength structures for equality.
Public operator Static member Implicit(Double to DataGridLength) Converts a Double to an instance of the DataGridLength class.
Public operator Static member Inequality Compares two DataGridLength structures to determine whether they are not equal.
Top

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ