C# Class ArcGISPortalViewer.Controls.Primitives.UniformGrid

A UniformGrid implementation for Silverlight that arranges children in a grid with all equal cell sizes.
Inheritance: Windows.UI.Xaml.Controls.Panel
Mostrar archivo Open project: Esri/arcgis-portalviewer-dotnet

Public Properties

Property Type Description
ColumnsProperty Windows.UI.Xaml.DependencyProperty
FirstColumnProperty Windows.UI.Xaml.DependencyProperty
RowsProperty Windows.UI.Xaml.DependencyProperty

Private Properties

Property Type Description
OnIntegerDependencyPropertyChanged void
UpdateComputedValues void

Public Methods

Method Description
UniformGrid ( ) : System

Initializes a new instance of UniformGrid.

Protected Methods

Method Description
ArrangeOverride ( Size arrangeSize ) : Size

Arrange the children of the UniformGrid by distributing space evenly among the children, making each child the size equal to a cell portion of the arrangeSize parameter.

MeasureOverride ( Size constraint ) : Size

Compute the desired size of the UniformGrid by measuring all of the children with a constraint equal to a cell's portion of the given constraint. The maximum child width and maximum child height are tracked, and then the desired size is computed by multiplying these maximums by the row and column count.

Private Methods

Method Description
OnIntegerDependencyPropertyChanged ( DependencyObject o, DependencyPropertyChangedEventArgs e ) : void

Validate the new property value and silently revert if the new value is not appropriate. Used in place of WPF value coercian by the dependency properties in UniformGrid.

UpdateComputedValues ( ) : void

If the Rows or Columns values are set to 0, dynamically compute the values based on the actual number of non-collapsed children.

In the case when both Rows and Columns are set to 0, the Rows and Columns will be equal, laying out a square grid.

Method Details

ArrangeOverride() protected method

Arrange the children of the UniformGrid by distributing space evenly among the children, making each child the size equal to a cell portion of the arrangeSize parameter.
protected ArrangeOverride ( Size arrangeSize ) : Size
arrangeSize Windows.Foundation.Size The arrange size.
return Windows.Foundation.Size

MeasureOverride() protected method

Compute the desired size of the UniformGrid by measuring all of the children with a constraint equal to a cell's portion of the given constraint. The maximum child width and maximum child height are tracked, and then the desired size is computed by multiplying these maximums by the row and column count.
protected MeasureOverride ( Size constraint ) : Size
constraint Windows.Foundation.Size The size constraint.
return Windows.Foundation.Size

UniformGrid() public method

Initializes a new instance of UniformGrid.
public UniformGrid ( ) : System
return System

Property Details

ColumnsProperty public_oe static_oe property

DependencyProperty for the Columns property.
public static DependencyProperty,Windows.UI.Xaml ColumnsProperty
return Windows.UI.Xaml.DependencyProperty

FirstColumnProperty public_oe static_oe property

The FirstColumnProperty dependency property.
public static DependencyProperty,Windows.UI.Xaml FirstColumnProperty
return Windows.UI.Xaml.DependencyProperty

RowsProperty public_oe static_oe property

The Rows DependencyProperty.
public static DependencyProperty,Windows.UI.Xaml RowsProperty
return Windows.UI.Xaml.DependencyProperty