summaryrefslogtreecommitdiff
path: root/docs/Xamarin.Forms.Core/Xamarin.Forms/BoxView.xml
blob: e71e45ae83d65278b9c21c17c9e3de1e2ff6ff9a (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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<Type Name="BoxView" FullName="Xamarin.Forms.BoxView">
  <TypeSignature Language="C#" Value="public class BoxView : Xamarin.Forms.View, Xamarin.Forms.IElementConfiguration&lt;Xamarin.Forms.BoxView&gt;" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit BoxView extends Xamarin.Forms.View implements class Xamarin.Forms.IElementConfiguration`1&lt;class Xamarin.Forms.BoxView&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.4.0.0</AssemblyVersion>
    <AssemblyVersion>1.5.0.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Xamarin.Forms.View</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>Xamarin.Forms.IElementConfiguration&lt;Xamarin.Forms.BoxView&gt;</InterfaceName>
    </Interface>
  </Interfaces>
  <Attributes>
    <Attribute>
      <AttributeName>Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._BoxViewRenderer))</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>A <see cref="T:Xamarin.Forms.View" /> used to draw a solid colored rectangle.</summary>
    <remarks>
      <para>BoxView is a useful stand-in for images or custom elements when doing initial prototyping. BoxView has a default size request of 40x40. If you need a different size, assign the <see cref="P:Xamarin.Forms.VisualElement.WidthRequest" /> and <see cref="P:Xamarin.Forms.VisualElement.HeightRequest" /> properties.</para>
      <para>XAML for Xamarin.Forms supports the following properties for the <see cref="T:Xamarin.Forms.BoxView" /> class:</para>
      <example>
        <para>The example below creates a red <see cref="T:Xamarin.Forms.Boxview" /> with the default width and height.</para>
        <code lang="XAML"><![CDATA[<BoxView Color="Red" />]]></code>
      </example>
      <para>The following example shows a basic use:</para>
      <example>
        <code lang="C#"><![CDATA[
using System;
using Xamarin.Forms;

namespace FormsGallery
{
    class BoxViewDemoPage : ContentPage
    {
        public BoxViewDemoPage()
        {
            Label header = new Label
            {
                Text = "BoxView",
                Font = Font.BoldSystemFontOfSize(50),
                HorizontalOptions = LayoutOptions.Center
            };

            BoxView boxView = new BoxView
            {
                Color = Color.Accent,
                WidthRequest = 150,
                HeightRequest = 150,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.CenterAndExpand
            };

            // Accomodate iPhone status bar.
            this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);

            // Build the page.
            this.Content = new StackLayout
            {
                Children = 
                {
                    header,
                    boxView
                }
            };
        }
    }
}
]]></code>
      </example>
      <para>
        <img href="BoxView.TripleScreenShot.png" />
      </para>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public BoxView ();" />
      <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 instance of the BoxView class.</summary>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="Color">
      <MemberSignature Language="C#" Value="public Xamarin.Forms.Color Color { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance valuetype Xamarin.Forms.Color Color" />
      <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.Color</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Gets or sets the color which will fill the rectangle. This is a bindable property.</summary>
        <value>The color that is used to fill the rectangle. The default is <see cref="P:Xamarin.Forms.Color.Default" />.</value>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="ColorProperty">
      <MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty ColorProperty;" />
      <MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty ColorProperty" />
      <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.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 Color bindable property.</summary>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="On&lt;T&gt;">
      <MemberSignature Language="C#" Value="public Xamarin.Forms.IPlatformElementConfiguration&lt;T,Xamarin.Forms.BoxView&gt; On&lt;T&gt; () where T : Xamarin.Forms.IConfigPlatform;" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Xamarin.Forms.IPlatformElementConfiguration`2&lt;!!T, class Xamarin.Forms.BoxView&gt; On&lt;(class Xamarin.Forms.IConfigPlatform) T&gt;() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Xamarin.Forms.IPlatformElementConfiguration&lt;T,Xamarin.Forms.BoxView&gt;</ReturnType>
      </ReturnValue>
      <TypeParameters>
        <TypeParameter Name="T">
          <Constraints>
            <InterfaceName>Xamarin.Forms.IConfigPlatform</InterfaceName>
          </Constraints>
        </TypeParameter>
      </TypeParameters>
      <Parameters />
      <Docs>
        <typeparam name="T">To be added.</typeparam>
        <summary>Returns the platform-specific instance of this <see cref="T:Xamarin.Forms.BoxView" />, on which a platform-specific method may be called.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</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.3.0.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("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")</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">To be added.</param>
        <param name="heightConstraint">To be added.</param>
        <summary>Method that is called when a size request is made to the box view.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>