Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
406 lines (401 sloc) 22.5 KB
<Type Name="View" FullName="Xamarin.Forms.View">
<TypeSignature Language="C#" Value="public class View : Xamarin.Forms.VisualElement, Xamarin.Forms.Internals.IGestureController, Xamarin.Forms.IViewController" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit View extends Xamarin.Forms.VisualElement implements class Xamarin.Forms.IElementController, class Xamarin.Forms.Internals.IGestureController, class Xamarin.Forms.IViewController, class Xamarin.Forms.IVisualElementController" />
<TypeSignature Language="DocId" Value="T:Xamarin.Forms.View" />
<TypeSignature Language="F#" Value="type View = class&#xA; inherit VisualElement&#xA; interface IViewController&#xA; interface IVisualElementController&#xA; interface IElementController&#xA; interface IGestureController" />
<AssemblyInfo>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Xamarin.Forms.VisualElement</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Xamarin.Forms.IElementController</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Xamarin.Forms.Internals.IGestureController</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Xamarin.Forms.IViewController</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Xamarin.Forms.IVisualElementController</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>A visual element that is used to place layouts and controls on the screen.</summary>
<remarks>
<para>The <see cref="T:Xamarin.Forms.View" /> class is a base class for the <see cref="T:Xamarin.Forms.Layout" /> class, and most of the controls that application developers will use. Nearly all UI elements that an application developer will use are derived from <see cref="T:Xamarin.Forms.View" /> class. Because the <see cref="T:Xamarin.Forms.View" /> class ultimately inherits from <see cref="T:Xamarin.Forms.BindableObject" /> class, application developers can use the Model-View-ViewModel architecture, as well as XAML, to develop portable user interfaces. The remarks in the <see cref="T:Xamarin.Forms.BindableObject" /> topic provide a discussion of MVVM and bound properties.</para>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected internal View ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Xamarin.Forms.View.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the View class.</summary>
<remarks>It is unlikely that an application developer would want to create a new View instance on their own.</remarks>
</Docs>
</Member>
<Member MemberName="GestureController">
<MemberSignature Language="C#" Value="protected internal Xamarin.Forms.Internals.IGestureController GestureController { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Xamarin.Forms.Internals.IGestureController GestureController" />
<MemberSignature Language="DocId" Value="P:Xamarin.Forms.View.GestureController" />
<MemberSignature Language="F#" Value="member this.GestureController : Xamarin.Forms.Internals.IGestureController" Usage="Xamarin.Forms.View.GestureController" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Xamarin.Forms.Internals.IGestureController</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the gesture controller for the view.</summary>
<value>The gesture controller for the view.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GestureRecognizers">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IList&lt;Xamarin.Forms.IGestureRecognizer&gt; GestureRecognizers { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IList`1&lt;class Xamarin.Forms.IGestureRecognizer&gt; GestureRecognizers" />
<MemberSignature Language="DocId" Value="P:Xamarin.Forms.View.GestureRecognizers" />
<MemberSignature Language="F#" Value="member this.GestureRecognizers : System.Collections.Generic.IList&lt;Xamarin.Forms.IGestureRecognizer&gt;" Usage="Xamarin.Forms.View.GestureRecognizers" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList&lt;Xamarin.Forms.IGestureRecognizer&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>The collection of gesture recognizers associated with this view.</summary>
<value>A List of <see cref="T:Xamarin.Forms.IGestureRecognizer" />.</value>
<remarks>
<para>
Adding items to this collection will associate gesture events with this element. This is not nessesary for elements which natively support input, such as a Button.
</para>
<para>
This example creates a tap gesture recognizer and associates it with an image. When the image is double tapped, it will become semi-transparent.
</para>
<example>
<code lang="csharp lang-csharp"><![CDATA[
var image = new Image {Source = "image.png"};
var gestureRecognizer = new TapGestureRecognizer {
TappedCallback = o => image.Opacity = 0.5,
NumberOfTapsRequired = 2
};
image.GestureRecognizers.Add (gestureRecognizer);
]]></code>
</example>
</remarks>
</Docs>
</Member>
<Member MemberName="GetChildElements">
<MemberSignature Language="C#" Value="public virtual System.Collections.Generic.IList&lt;Xamarin.Forms.GestureElement&gt; GetChildElements (Xamarin.Forms.Point point);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IList`1&lt;class Xamarin.Forms.GestureElement&gt; GetChildElements(valuetype Xamarin.Forms.Point point) cil managed" />
<MemberSignature Language="DocId" Value="M:Xamarin.Forms.View.GetChildElements(Xamarin.Forms.Point)" />
<MemberSignature Language="F#" Value="abstract member GetChildElements : Xamarin.Forms.Point -&gt; System.Collections.Generic.IList&lt;Xamarin.Forms.GestureElement&gt;&#xA;override this.GetChildElements : Xamarin.Forms.Point -&gt; System.Collections.Generic.IList&lt;Xamarin.Forms.GestureElement&gt;" Usage="view.GetChildElements point" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Xamarin.Forms.Internals.IGestureController.GetChildElements(Xamarin.Forms.Point)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList&lt;Xamarin.Forms.GestureElement&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="point" Type="Xamarin.Forms.Point" />
</Parameters>
<Docs>
<param name="point">The point under which to search for child elements.</param>
<summary>Returns the child elements that are visually beneath the specified <paramref name="point" />.</summary>
<returns>The child elements that are visually beneath the specified <paramref name="point" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HorizontalOptions">
<MemberSignature Language="C#" Value="public Xamarin.Forms.LayoutOptions HorizontalOptions { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype Xamarin.Forms.LayoutOptions HorizontalOptions" />
<MemberSignature Language="DocId" Value="P:Xamarin.Forms.View.HorizontalOptions" />
<MemberSignature Language="F#" Value="member this.HorizontalOptions : Xamarin.Forms.LayoutOptions with get, set" Usage="Xamarin.Forms.View.HorizontalOptions" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Xamarin.Forms.LayoutOptions</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="T:Xamarin.Forms.LayoutOptions" /> that define how the element gets laid in a layout cycle. This is a bindable property.</summary>
<value>A <see cref="T:Xamarin.Forms.LayoutOptions" /> which defines how to lay out the element. Default value is <see cref="F:Xamarin.Forms.LayoutOptions.Fill" /> unless otherwise documented.</value>
<remarks>
<para>
Assigning the HorizontalOptions modifies how the element is laid out when there is excess space available along the X axis from the parent layout. Additionally it specifies if the element should consume leftover space in the X axis from the parent layout. If multiple children of a layout are set to expand, the extra space is distributed proportionally.
</para>
<para>
This example creates four views and adds them to a stack, each laying out in a different manner.
</para>
<example>
<code lang="csharp lang-csharp"><![CDATA[
private View CreateButtons ()
{
var button1 = new Button {Text = "LeftAligned", HorizontalOptions=LayoutOptions.Start};
var button2 = new Button {Text = "CenterAligned", HorizontalOptions=LayoutOptions.Center};
var button3 = new Button {Text = "EndAligned", HorizontalOptions=LayoutOptions.End};
var button4 = new Button {Text = "Fill", HorizontalOptions=LayoutOptions.Fill};
StackLayout stack = new StackLayout {
Children = {
button1,
button2,
button3,
button4
}
};
return stack;
}
]]></code>
</example>
</remarks>
</Docs>
</Member>
<Member MemberName="HorizontalOptionsProperty">
<MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty HorizontalOptionsProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty HorizontalOptionsProperty" />
<MemberSignature Language="DocId" Value="F:Xamarin.Forms.View.HorizontalOptionsProperty" />
<MemberSignature Language="F#" Value=" staticval mutable HorizontalOptionsProperty : Xamarin.Forms.BindableProperty" Usage="Xamarin.Forms.View.HorizontalOptionsProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the HorizontalOptions bindable property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Margin">
<MemberSignature Language="C#" Value="public Xamarin.Forms.Thickness Margin { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype Xamarin.Forms.Thickness Margin" />
<MemberSignature Language="DocId" Value="P:Xamarin.Forms.View.Margin" />
<MemberSignature Language="F#" Value="member this.Margin : Xamarin.Forms.Thickness with get, set" Usage="Xamarin.Forms.View.Margin" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Xamarin.Forms.Thickness</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the margin for the view.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MarginProperty">
<MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty MarginProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty MarginProperty" />
<MemberSignature Language="DocId" Value="F:Xamarin.Forms.View.MarginProperty" />
<MemberSignature Language="F#" Value=" staticval mutable MarginProperty : Xamarin.Forms.BindableProperty" Usage="Xamarin.Forms.View.MarginProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Backing store for the <see cref="P:Xamarin.Forms.View.Margin" /> property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnBindingContextChanged">
<MemberSignature Language="C#" Value="protected override void OnBindingContextChanged ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnBindingContextChanged() cil managed" />
<MemberSignature Language="DocId" Value="M:Xamarin.Forms.View.OnBindingContextChanged" />
<MemberSignature Language="F#" Value="override this.OnBindingContextChanged : unit -&gt; unit" Usage="view.OnBindingContextChanged " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Invoked whenever the binding context of the <see cref="T:Xamarin.Forms.View" /> changes. Override this method to add class handling for this event.</summary>
<remarks>
<para>Overriders must call the base method.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="VerticalOptions">
<MemberSignature Language="C#" Value="public Xamarin.Forms.LayoutOptions VerticalOptions { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype Xamarin.Forms.LayoutOptions VerticalOptions" />
<MemberSignature Language="DocId" Value="P:Xamarin.Forms.View.VerticalOptions" />
<MemberSignature Language="F#" Value="member this.VerticalOptions : Xamarin.Forms.LayoutOptions with get, set" Usage="Xamarin.Forms.View.VerticalOptions" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Xamarin.Forms.LayoutOptions</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="T:Xamarin.Forms.LayoutOptions" /> that define how the element gets laid in a layout cycle. This is a bindable property.</summary>
<value>A <see cref="T:Xamarin.Forms.LayoutOptions" /> which defines how to lay out the element. Default value is <see cref="F:Xamarin.Forms.LayoutOptions.Fill" /> unless otherwise documented.</value>
<remarks>
<para>
Assigning the VerticalOptions modifies how the element is laid out when there is excess space available along the Y axis from the parent layout. Additionally it specifies if the element should consume leftover space in the Y axis from the parent layout. If multiple children of a layout are set to expand, the extra space is distributed proportionally.
</para>
<para>
This example creates four views and adds them to a stack, each laying out in a different manner.
</para>
<example>
<code lang="csharp lang-csharp"><![CDATA[
private View CreateButtons ()
{
var button1 = new Button {Text = "TopAligned", VerticalOptions=LayoutOptions.Start};
var button2 = new Button {Text = "CenterAligned", VerticalOptions=LayoutOptions.Center};
var button3 = new Button {Text = "BottomAligned", VerticalOptions=LayoutOptions.End};
var button4 = new Button {Text = "Fill", VerticalOptions=LayoutOptions.Fill};
StackLayout stack = new StackLayout {
Orientation = StackOrientation.Horizontal,
Children = {
button1,
button2,
button3,
button4
}
};
return stack;
}
]]></code>
</example>
</remarks>
</Docs>
</Member>
<Member MemberName="VerticalOptionsProperty">
<MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty VerticalOptionsProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty VerticalOptionsProperty" />
<MemberSignature Language="DocId" Value="F:Xamarin.Forms.View.VerticalOptionsProperty" />
<MemberSignature Language="F#" Value=" staticval mutable VerticalOptionsProperty : Xamarin.Forms.BindableProperty" Usage="Xamarin.Forms.View.VerticalOptionsProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<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.4.0.0</AssemblyVersion>
<AssemblyVersion>1.5.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the VerticalOptions bindable property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Xamarin.Forms.Internals.IGestureController.CompositeGestureRecognizers">
<MemberSignature Language="C#" Value="System.Collections.Generic.IList&lt;Xamarin.Forms.IGestureRecognizer&gt; Xamarin.Forms.Internals.IGestureController.CompositeGestureRecognizers { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IList`1&lt;class Xamarin.Forms.IGestureRecognizer&gt; Xamarin.Forms.Internals.IGestureController.CompositeGestureRecognizers" />
<MemberSignature Language="DocId" Value="P:Xamarin.Forms.View.Xamarin#Forms#Internals#IGestureController#CompositeGestureRecognizers" />
<MemberSignature Language="F#" Usage="Xamarin.Forms.Internals.IGestureController.CompositeGestureRecognizers" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Xamarin.Forms.Internals.IGestureController.CompositeGestureRecognizers</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Xamarin.Forms.Core</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList&lt;Xamarin.Forms.IGestureRecognizer&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>For internal use by the Xamarin.Forms platform.</summary>
<value>For internal use by the Xamarin.Forms platform.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.