summaryrefslogtreecommitdiff
path: root/docs/Xamarin.Forms.Core/Xamarin.Forms/StackLayout.xml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/Xamarin.Forms.Core/Xamarin.Forms/StackLayout.xml')
-rw-r--r--docs/Xamarin.Forms.Core/Xamarin.Forms/StackLayout.xml357
1 files changed, 357 insertions, 0 deletions
diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/StackLayout.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/StackLayout.xml
new file mode 100644
index 00000000..df187061
--- /dev/null
+++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/StackLayout.xml
@@ -0,0 +1,357 @@
+<Type Name="StackLayout" FullName="Xamarin.Forms.StackLayout">
+ <TypeSignature Language="C#" Value="public class StackLayout : Xamarin.Forms.Layout&lt;Xamarin.Forms.View&gt;" />
+ <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit StackLayout extends Xamarin.Forms.Layout`1&lt;class Xamarin.Forms.View&gt;" />
+ <AssemblyInfo>
+ <AssemblyName>Xamarin.Forms.Core</AssemblyName>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>Xamarin.Forms.Layout&lt;Xamarin.Forms.View&gt;</BaseTypeName>
+ <BaseTypeArguments>
+ <BaseTypeArgument TypeParamName="T">Xamarin.Forms.View</BaseTypeArgument>
+ </BaseTypeArguments>
+ </Base>
+ <Interfaces />
+ <Docs>
+ <summary>A <see cref="T:Xamarin.Forms.Layout`1" /> that positions child elements in a single line which can be oriented vertically or horizontally.</summary>
+ <remarks>
+ <para>Because <see cref="T:Xamarin.Forms.StackLayout" /> layouts override the bounds on their child elements, application developers should not set bounds on them.</para>
+ <example>
+ <para>The following example code, adapted from the <format type="text/html"><a href="http://developer.xamarin.com/samples/tag/Xamarin.Forms/" target="_blank">FormsGallery</a></format> example shows how to create a new <see cref="T:Xamarin.Forms.StackLayout" /> with children that explore many of the layout behaviors of <see cref="T:Xamarin.Forms.StackLayout" />:</para>
+ <code lang="C#"><![CDATA[
+StackLayout stackLayout = new StackLayout
+{
+ Spacing = 0,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children =
+ {
+ new Label
+ {
+ Text = "StackLayout",
+ HorizontalOptions = LayoutOptions.Start
+ },
+ new Label
+ {
+ Text = "stacks its children",
+ HorizontalOptions = LayoutOptions.Center
+ },
+ new Label
+ {
+ Text = "vertically",
+ HorizontalOptions = LayoutOptions.End
+ },
+ new Label
+ {
+ Text = "by default,",
+ HorizontalOptions = LayoutOptions.Center
+ },
+ new Label
+ {
+ Text = "but horizontal placement",
+ HorizontalOptions = LayoutOptions.Start
+ },
+ new Label
+ {
+ Text = "can be controlled with",
+ HorizontalOptions = LayoutOptions.Center
+ },
+ new Label
+ {
+ Text = "the HorizontalOptions property.",
+ HorizontalOptions = LayoutOptions.End
+ },
+ new Label
+ {
+ Text = "An Expand option allows one or more children " +
+ "to occupy the an area within the remaining " +
+ "space of the StackLayout after it's been sized " +
+ "to the height of its parent.",
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.End
+ },
+ new StackLayout
+ {
+ Spacing = 0,
+ Orientation = StackOrientation.Horizontal,
+ Children =
+ {
+ new Label
+ {
+ Text = "Stacking",
+ },
+ new Label
+ {
+ Text = "can also be",
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ },
+ new Label
+ {
+ Text = "horizontal.",
+ },
+ }
+ }
+ }
+};
+]]></code>
+ </example>
+ <para>
+ <img href="StackLayout.TripleScreenShot.png" />
+ </para>
+ <para>XAML for Xamarin.Forms supports the following properties for the <see cref="T:Xamarin.Forms.StackLayout" /> class:</para>
+ <list type="table">
+ <listheader>
+ <term>Property</term>
+ <description>Value</description>
+ </listheader>
+ <item>
+ <term>Orientation</term>
+ <description>
+ <para>
+ <c>Horizontal</c> or <c>Vertical</c>. The default is <c>Vertical</c>.</para>
+ </description>
+ </item>
+ <item>
+ <term>Spacing</term>
+ <description>
+ <para>An integer or decimal.</para>
+ </description>
+ </item>
+ </list>
+ </remarks>
+ </Docs>
+ <Members>
+ <Member MemberName=".ctor">
+ <MemberSignature Language="C#" Value="public StackLayout ();" />
+ <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
+ <MemberType>Constructor</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Parameters />
+ <Docs>
+ <summary>Initializes a new instance of the StackLayout class.</summary>
+ <remarks>
+ <para>
+ The following example shows the initialization of a new StackLayout and setting its orientation and children.
+ </para>
+ <example>
+ <code lang="C#"><![CDATA[
+var stackLayout = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ firstChild,
+ secondChild,
+ thirdChild
+ }
+};
+ ]]></code>
+ </example>
+ </remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="InvalidateMeasure">
+ <MemberSignature Language="C#" Value="protected override void InvalidateMeasure ();" />
+ <MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void InvalidateMeasure() cil managed" />
+ <MemberType>Method</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>System.Void</ReturnType>
+ </ReturnValue>
+ <Parameters />
+ <Docs>
+ <summary>Invalidates the layout.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="LayoutChildren">
+ <MemberSignature Language="C#" Value="protected override void LayoutChildren (double x, double y, double width, double height);" />
+ <MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void LayoutChildren(float64 x, float64 y, float64 width, float64 height) cil managed" />
+ <MemberType>Method</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>System.Void</ReturnType>
+ </ReturnValue>
+ <Parameters>
+ <Parameter Name="x" Type="System.Double" />
+ <Parameter Name="y" Type="System.Double" />
+ <Parameter Name="width" Type="System.Double" />
+ <Parameter Name="height" Type="System.Double" />
+ </Parameters>
+ <Docs>
+ <param name="x">A value representing the x coordinate of the child region bounding box.</param>
+ <param name="y">A value representing the y coordinate of the child region bounding box.</param>
+ <param name="width">A value representing the width of the child region bounding box.</param>
+ <param name="height">A value representing the height of the child region bounding box.</param>
+ <summary>Positions and sizes the children of a StackLayout.</summary>
+ <remarks>Implementors wishing to change the default behavior of a StackLayout should override this method. It is suggested to still call the base method and modify its calculated results.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="OnSizeRequest">
+ <MemberSignature Language="C#" Value="protected override Xamarin.Forms.SizeRequest OnSizeRequest (double widthConstraint, double heightConstraint);" />
+ <MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype Xamarin.Forms.SizeRequest OnSizeRequest(float64 widthConstraint, float64 heightConstraint) cil managed" />
+ <MemberType>Method</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Attributes>
+ <Attribute>
+ <AttributeName>System.Obsolete("Use OnMeasure")</AttributeName>
+ </Attribute>
+ </Attributes>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.SizeRequest</ReturnType>
+ </ReturnValue>
+ <Parameters>
+ <Parameter Name="widthConstraint" Type="System.Double" />
+ <Parameter Name="heightConstraint" Type="System.Double" />
+ </Parameters>
+ <Docs>
+ <param name="widthConstraint">The available width for the StackLayout to use.</param>
+ <param name="heightConstraint">The available height for the StackLayout to use.</param>
+ <summary>This method is called during the measure pass of a layout cycle to get the desired size of the StackLayout.</summary>
+ <returns>A <see cref="T:Xamarin.Forms.SizeRequest" /> which contains the desired size of the StackLayout.</returns>
+ <remarks>The results of this method will be a sum of all the desired sizes of its children along the orientation axis, and the maximum along the non-orientation axis.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="Orientation">
+ <MemberSignature Language="C#" Value="public Xamarin.Forms.StackOrientation Orientation { get; set; }" />
+ <MemberSignature Language="ILAsm" Value=".property instance valuetype Xamarin.Forms.StackOrientation Orientation" />
+ <MemberType>Property</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.StackOrientation</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>Gets or sets the value which indicates the direction which child elements are positioned.</summary>
+ <value>A <see cref="T:Xamarin.Forms.StackOrientation" /> which indicates the direction children layouts flow. The default value is Vertical.</value>
+ <remarks>Setting the Orientation of a StackLayout triggers a layout cycle if the stack is already inside of a parent layout. To prevent wasted layout cycles, set the orientation prior to adding the StackLayout to a parent.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="OrientationProperty">
+ <MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty OrientationProperty;" />
+ <MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty OrientationProperty" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>Identifies the Orientation bindable property.</summary>
+ <remarks>
+ </remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="Spacing">
+ <MemberSignature Language="C#" Value="public double Spacing { get; set; }" />
+ <MemberSignature Language="ILAsm" Value=".property instance float64 Spacing" />
+ <MemberType>Property</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>System.Double</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>Gets or sets a value which indicates the amount of space between each child element.</summary>
+ <value>A value in device pixels which indicates the amount of space between each element. The default value is 6.0.</value>
+ <remarks>
+ <para>
+ Setting this value triggers a layout cycle if the StackLayout is already in a parent Layout.
+ </para>
+ <para>
+ The following example sets the Spacing on construction of a StackLayout.
+ </para>
+ <example>
+ <code lang="C#"><![CDATA[
+var stackLayout = new StackLayout {
+ Spacing = 10
+};
+ ]]></code>
+ </example>
+ </remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="SpacingProperty">
+ <MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty SpacingProperty;" />
+ <MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty SpacingProperty" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <AssemblyVersion>1.1.0.0</AssemblyVersion>
+ <AssemblyVersion>1.2.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.0.0</AssemblyVersion>
+ <AssemblyVersion>1.3.3.0</AssemblyVersion>
+ <AssemblyVersion>1.4.0.0</AssemblyVersion>
+ <AssemblyVersion>1.5.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>Identifies the Spacing bindable property.</summary>
+ <remarks>
+ </remarks>
+ </Docs>
+ </Member>
+ </Members>
+</Type>