C# Class SilverlightFX.UserInterface.FormPanel

A Panel control with behavior to automatically layout its children in a form-like manner. The children consist of regular elements along with Label elements to represent associated form labels.
Inheritance: System.Windows.Controls.Grid
Exibir arquivo Open project: nikhilk/silverlightfx Class Usage Examples

Public Properties

Property Type Description
IsLabeledProperty System.Windows.DependencyProperty
IsStretchedProperty System.Windows.DependencyProperty
LabelAlignmentProperty System.Windows.DependencyProperty
LabelPositionProperty System.Windows.DependencyProperty
LabelSpacingProperty System.Windows.DependencyProperty
OrientationProperty System.Windows.DependencyProperty
SpacingModeProperty System.Windows.DependencyProperty
SpacingProperty System.Windows.DependencyProperty

Public Methods

Method Description
FormPanel ( ) : System

Initializes a new instance of a FormPanel panel.

GetIsLabeled ( FrameworkElement element ) : bool

Gets whether a particular element in a FormPanel has an associated Label. The default is true.

GetIsStretched ( FrameworkElement element ) : bool

Gets whether a particular element in a FormPanel should be stretched to consume all available space.

GetLabelPosition ( Label element ) : FormPanelLabelPosition

Gets the position of a Label with respect to its associated element in a FormPanel.

GetSpacingMode ( FrameworkElement element ) : FormPanelSpacing

Gets the spacing mode of the element relative to the previous label/element group.

SetIsLabeled ( FrameworkElement element, bool labeled ) : void

Sets whether a particular element in a FormPanel has an associated Label.

SetIsStretched ( FrameworkElement element, bool stretched ) : void

Sets whether a particular element in a FormPanel is stretched to consume all available space.

SetLabelPosition ( Label element, FormPanelLabelPosition labelPosition ) : void

Sets the relative position of a Label with respect to its associated element in a FormPanel.

SetSpacingMode ( FrameworkElement element, FormPanelSpacing spacingMode ) : void

Sets the spacing mode of the element relative to the previous label/element group.

Private Methods

Method Description
OnLayoutAttachedPropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnLayoutPropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnLayoutUpdated ( object sender, EventArgs e ) : void
OnLoaded ( object sender, RoutedEventArgs e ) : void
UpdateLayout ( bool orientationChanged ) : void
UpdateLayoutHorizontal ( ) : void
UpdateLayoutVertical ( ) : void

Method Details

FormPanel() public method

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

GetIsLabeled() public static method

Gets whether a particular element in a FormPanel has an associated Label. The default is true.
public static GetIsLabeled ( FrameworkElement element ) : bool
element System.Windows.FrameworkElement The element to lookup.
return bool

GetIsStretched() public static method

Gets whether a particular element in a FormPanel should be stretched to consume all available space.
public static GetIsStretched ( FrameworkElement element ) : bool
element System.Windows.FrameworkElement The element to lookup.
return bool

GetLabelPosition() public static method

Gets the position of a Label with respect to its associated element in a FormPanel.
public static GetLabelPosition ( Label element ) : FormPanelLabelPosition
element Label The Label element to lookup.
return FormPanelLabelPosition

GetSpacingMode() public static method

Gets the spacing mode of the element relative to the previous label/element group.
public static GetSpacingMode ( FrameworkElement element ) : FormPanelSpacing
element System.Windows.FrameworkElement The element to set.
return FormPanelSpacing

SetIsLabeled() public static method

Sets whether a particular element in a FormPanel has an associated Label.
public static SetIsLabeled ( FrameworkElement element, bool labeled ) : void
element System.Windows.FrameworkElement The element to set.
labeled bool true if the element has an associated Label; false otherwise.
return void

SetIsStretched() public static method

Sets whether a particular element in a FormPanel is stretched to consume all available space.
public static SetIsStretched ( FrameworkElement element, bool stretched ) : void
element System.Windows.FrameworkElement The element to set.
stretched bool true if the element should be stretched; false otherwise.
return void

SetLabelPosition() public static method

Sets the relative position of a Label with respect to its associated element in a FormPanel.
public static SetLabelPosition ( Label element, FormPanelLabelPosition labelPosition ) : void
element Label The Label element to set.
labelPosition FormPanelLabelPosition The relative position.
return void

SetSpacingMode() public static method

Sets the spacing mode of the element relative to the previous label/element group.
public static SetSpacingMode ( FrameworkElement element, FormPanelSpacing spacingMode ) : void
element System.Windows.FrameworkElement The element to set.
spacingMode FormPanelSpacing The spacing mode to use.
return void

Property Details

IsLabeledProperty public_oe static_oe property

Represents the IsLabeled attached property.
public static DependencyProperty,System.Windows IsLabeledProperty
return System.Windows.DependencyProperty

IsStretchedProperty public_oe static_oe property

Represents the IsStretched attached property.
public static DependencyProperty,System.Windows IsStretchedProperty
return System.Windows.DependencyProperty

LabelAlignmentProperty public_oe static_oe property

Represents the LabelAlignment property.
public static DependencyProperty,System.Windows LabelAlignmentProperty
return System.Windows.DependencyProperty

LabelPositionProperty public_oe static_oe property

Represents the LabelPosition attached property.
public static DependencyProperty,System.Windows LabelPositionProperty
return System.Windows.DependencyProperty

LabelSpacingProperty public_oe static_oe property

Represents the LabelSpacing property.
public static DependencyProperty,System.Windows LabelSpacingProperty
return System.Windows.DependencyProperty

OrientationProperty public_oe static_oe property

Represents the Orientation property.
public static DependencyProperty,System.Windows OrientationProperty
return System.Windows.DependencyProperty

SpacingModeProperty public_oe static_oe property

Represents the SpacingMode attached property.
public static DependencyProperty,System.Windows SpacingModeProperty
return System.Windows.DependencyProperty

SpacingProperty public_oe static_oe property

Represents the Spacing property.
public static DependencyProperty,System.Windows SpacingProperty
return System.Windows.DependencyProperty