C# Class ComponentFactory.Quicksilver.Layout.GridLayout

Arranges child elements in a flexible grid area that consists of columns and rows.
Inheritance: Layout
ファイルを表示 Open project: ComponentFactory/Quicksilver Class Usage Examples

Public Properties

Property Type Description
ColumnProperty System.Windows.DependencyProperty
ColumnSpanProperty System.Windows.DependencyProperty
RowProperty System.Windows.DependencyProperty
RowSpanProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
BuildProxyColumns void
BuildProxyRows void
CalculateDesiredSize System.Windows.Size
CalculateOffsetsAndTotals void
CalculateOffsetsAndTotals void
GetColumn int
GetColumnSpan int
GetRow int
GetRowSpan int
MeasureElements void
OnAttachedPropertyChanged void
PreMeasure double
PreMeasure void
PreTarget void
PreTargetStarDefinitions void
TargetArrangeSize System.Windows.Rect
UpdateDefinitions void

Public Methods

Method Description
AddToLogicalTree ( ILogicalParent parent ) : void

Add this element into the logical tree.

GridLayout ( ) : System

Initialize a new instance of the GridLayout class.

MeasureChildren ( string layoutId, MetaPanelBase metaPanel, MetaElementStateDict stateDict, ICollection elements, Size availableSize ) : Size

Measure the layout size required to arrange all elements.

RemoveFromLogicalTree ( ILogicalParent parent ) : void

Add this element from the logial tree.

SetColumn ( UIElement element, int column ) : void

Sets the value of the Column attached property to a specified element.

SetColumnSpan ( UIElement element, int columnSpan ) : void

Sets the value of the ColumnSpan attached property to a specified element.

SetRow ( UIElement element, int row ) : void

Sets the value of the Row attached property to a specified element.

SetRowSpan ( UIElement element, int rowSpan ) : void

Sets the value of the RowSpan attached property to a specified element.

TargetChildren ( string layoutId, MetaPanelBase metaPanel, MetaElementStateDict stateDict, ICollection elements, Size finalSize ) : void

Calculate target state for each element based on layout algorithm.

Private Methods

Method Description
BuildProxyColumns ( ) : void
BuildProxyRows ( ) : void
CalculateDesiredSize ( MetaElementStateDict stateDict, ICollection elements, Size availableSize ) : Size
CalculateOffsetsAndTotals ( ) : void
CalculateOffsetsAndTotals ( DefinitionProxy proxies ) : void
GetColumn ( UIElement element ) : int
GetColumnSpan ( UIElement element ) : int
GetRow ( UIElement element ) : int
GetRowSpan ( UIElement element ) : int
MeasureElements ( MetaElementStateDict stateDict, ICollection elements ) : void
OnAttachedPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
PreMeasure ( double size, DefinitionProxy proxies ) : double
PreMeasure ( Size availableSize ) : void
PreTarget ( Size availableSize ) : void
PreTargetStarDefinitions ( double size, DefinitionProxy proxies, double stars ) : void
TargetArrangeSize ( UIElement element ) : Rect
UpdateDefinitions ( MetaElementStateDict stateDict, ICollection elements, bool spanning ) : void

Method Details

AddToLogicalTree() public method

Add this element into the logical tree.
public AddToLogicalTree ( ILogicalParent parent ) : void
parent ILogicalParent Interface of logical parent.
return void

GridLayout() public method

Initialize a new instance of the GridLayout class.
public GridLayout ( ) : System
return System

MeasureChildren() public method

Measure the layout size required to arrange all elements.
public MeasureChildren ( string layoutId, MetaPanelBase metaPanel, MetaElementStateDict stateDict, ICollection elements, Size availableSize ) : Size
layoutId string Identifier of the layout to be used.
metaPanel MetaPanelBase Reference to owning panel instance.
stateDict MetaElementStateDict Dictionary of per-element state.
elements ICollection Collection of elements to be measured.
availableSize System.Windows.Size Available size that can be given to elements.
return System.Windows.Size

RemoveFromLogicalTree() public method

Add this element from the logial tree.
public RemoveFromLogicalTree ( ILogicalParent parent ) : void
parent ILogicalParent Interface of logical parent.
return void

SetColumn() public static method

Sets the value of the Column attached property to a specified element.
public static SetColumn ( UIElement element, int column ) : void
element UIElement The element to which the attached property is written.
column int The new column value.
return void

SetColumnSpan() public static method

Sets the value of the ColumnSpan attached property to a specified element.
public static SetColumnSpan ( UIElement element, int columnSpan ) : void
element UIElement The element to which the attached property is written.
columnSpan int The new ColumnSpan value.
return void

SetRow() public static method

Sets the value of the Row attached property to a specified element.
public static SetRow ( UIElement element, int row ) : void
element UIElement The element to which the attached property is written.
row int The new row value.
return void

SetRowSpan() public static method

Sets the value of the RowSpan attached property to a specified element.
public static SetRowSpan ( UIElement element, int rowSpan ) : void
element UIElement The element to which the attached property is written.
rowSpan int The new RowSpan value.
return void

TargetChildren() public method

Calculate target state for each element based on layout algorithm.
public TargetChildren ( string layoutId, MetaPanelBase metaPanel, MetaElementStateDict stateDict, ICollection elements, Size finalSize ) : void
layoutId string Identifier of the layout to be used.
metaPanel MetaPanelBase Reference to owning panel instance.
stateDict MetaElementStateDict Dictionary of per-element state.
elements ICollection Collection of elements to be arranged.
finalSize System.Windows.Size Size that layout should use to arrange child elements.
return void

Property Details

ColumnProperty public_oe static_oe property

Identifies the Column dependency property.
public static DependencyProperty,System.Windows ColumnProperty
return System.Windows.DependencyProperty

ColumnSpanProperty public_oe static_oe property

Identifies the ColumnSpan dependency property.
public static DependencyProperty,System.Windows ColumnSpanProperty
return System.Windows.DependencyProperty

RowProperty public_oe static_oe property

Identifies the Row dependency property.
public static DependencyProperty,System.Windows RowProperty
return System.Windows.DependencyProperty

RowSpanProperty public_oe static_oe property

Identifies the RowSpan dependency property.
public static DependencyProperty,System.Windows RowSpanProperty
return System.Windows.DependencyProperty