summaryrefslogtreecommitdiff
path: root/docs/Xamarin.Forms.Core/Xamarin.Forms/ContentPage.xml
blob: be3ab18cd6527d7b69cf1708759de0d7d8cb10ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<Type Name="ContentPage" FullName="Xamarin.Forms.ContentPage">
  <TypeSignature Language="C#" Value="public class ContentPage : Xamarin.Forms.TemplatedPage" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ContentPage extends Xamarin.Forms.TemplatedPage" />
  <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.4.0.0</AssemblyVersion>
    <AssemblyVersion>1.5.0.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Xamarin.Forms.TemplatedPage</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <Attribute>
      <AttributeName>Xamarin.Forms.ContentProperty("Content")</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>A <see cref="T:Xamarin.Forms.Page" /> that displays a single view.</summary>
    <remarks>
      <para>This is a Page displaying a single View, often a container like a <see cref="T:Xamarin.Forms.StackLayout" /> or <see cref="T:Xamarin.Forms.ScrollView" />.</para>
      <example>
        <para>The example below is taken from he App.cs file that is contained in the default "Hello, Forms!" app. It  uses a <see cref="T:Xamarin.Forms.ContentPage" /> to display a label, which is a typical, though basic, use of the <see cref="T:Xamarin.Forms.ContentPage" /> class.</para>
        <code lang="C#"><![CDATA[
using System;
using Xamarin.Forms;

namespace ContentPageExample
{
    public class App
    {
        public static Page GetMainPage ()
        {    
            return new ContentPage { 
                Content = new Label {
                    Text = "Hello, Forms!",
                    VerticalOptions = LayoutOptions.CenterAndExpand,
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                },
            };
        }
    }
}
          ]]></code>
        <para>The FormsGallery sample, which can be found on the <format type="text/html"><a href="http://developer.xamarin.com/samples/tag/Xamarin.Forms/" target="_blank">Sample Applications</a></format> page, has a ContentPageDemoPage.cs file. This file contains a longer and more complicated example.</para>
        <para>XAML for Xamarin.Forms supports the following property for the <see cref="T:Xamarin.Forms.ContentPage" /> class:</para>
        <para>
          <list type="table">
            <listheader>
              <term>Property</term>
              <description>Value</description>
            </listheader>
            <item>
              <term>Content</term>
              <description>
                <para>A list of <see cref="T:Xamarin.Forms.View" /> objects that represent the visual content of the <see cref="T:Xamarin.Forms.ContentPage" />. This tag can be omitted, and the contents listed directly.</para>
              </description>
            </item>
          </list>A <c>ContentPage</c> tag can be the root element of a XAML document.</para>
        <para>
        </para>
      </example>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public ContentPage ();" />
      <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.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters />
      <Docs>
        <summary>Initializes a new ContentPage instance.</summary>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="Content">
      <MemberSignature Language="C#" Value="public Xamarin.Forms.View Content { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance class Xamarin.Forms.View Content" />
      <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.4.0.0</AssemblyVersion>
        <AssemblyVersion>1.5.0.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Xamarin.Forms.View</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Gets or sets the view that contains the content of the Page.</summary>
        <value>A <see cref="T:Xamarin.Forms.View" /> subclass, or <see langword="null" />.</value>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="ContentProperty">
      <MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty ContentProperty;" />
      <MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty ContentProperty" />
      <MemberType>Field</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Backing store for the <see cref="P:Xamarin.Forms.ContentPage.Content" /> 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" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Method that is called when the binding context changes.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>