|
| 1 | +<Type Name="CarouselPage" FullName="Xamarin.Forms.CarouselPage"> |
| 2 | + <TypeSignature Language="C#" Value="public class CarouselPage : Xamarin.Forms.MultiPage<Xamarin.Forms.ContentPage>" /> |
| 3 | + <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CarouselPage extends Xamarin.Forms.MultiPage`1<class Xamarin.Forms.ContentPage>" /> |
| 4 | + <AssemblyInfo> |
| 5 | + <AssemblyName>Xamarin.Forms.Core</AssemblyName> |
| 6 | + <AssemblyVersion>1.0.0.0</AssemblyVersion> |
| 7 | + <AssemblyVersion>1.1.0.0</AssemblyVersion> |
| 8 | + <AssemblyVersion>1.2.0.0</AssemblyVersion> |
| 9 | + <AssemblyVersion>1.3.0.0</AssemblyVersion> |
| 10 | + <AssemblyVersion>1.4.0.0</AssemblyVersion> |
| 11 | + <AssemblyVersion>1.5.0.0</AssemblyVersion> |
| 12 | + <AssemblyVersion>2.0.0.0</AssemblyVersion> |
| 13 | + </AssemblyInfo> |
| 14 | + <Base> |
| 15 | + <BaseTypeName>Xamarin.Forms.MultiPage<Xamarin.Forms.ContentPage></BaseTypeName> |
| 16 | + <BaseTypeArguments> |
| 17 | + <BaseTypeArgument TypeParamName="T">Xamarin.Forms.ContentPage</BaseTypeArgument> |
| 18 | + </BaseTypeArguments> |
| 19 | + </Base> |
| 20 | + <Interfaces /> |
| 21 | + <Attributes> |
| 22 | + <Attribute> |
| 23 | + <AttributeName>Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._CarouselPageRenderer))</AttributeName> |
| 24 | + </Attribute> |
| 25 | + </Attributes> |
| 26 | + <Docs> |
| 27 | + <summary>A Page that users can swipe from side to side to display pages of content, like a gallery.</summary> |
| 28 | + <remarks> |
| 29 | + <para>The <see cref="T:Xamarin.Forms.CarouselPage" /> provides a navigation experience that will feel natural and familiar to Windows Phone users. By using <see cref="M:Xamarin.Forms.Device.OnPlatform" />, application developers can provide customized navigation on a per-platform basis. For example, an application developer could use a <see cref="T:Xamarin.Forms.NavigationPage" /> for Android and iOS, and use a <see cref="T:Xamarin.Forms.CarouselPage" /> on Windows Phone.</para> |
| 30 | + <example> |
| 31 | + <para>The following XAML example, when properly included and referenced in a Xamarin.Forms project, creates a <see cref="T:Xamarin.Forms.CarouselPage" /> that displays three simple <see cref="T:Xamarin.Forms.ContentPage" /> elements: |
| 32 | + </para> |
| 33 | + <code lang="XAML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> |
| 34 | +<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="XamlExample1.MyPage"> |
| 35 | + <ContentPage> |
| 36 | + <StackLayout> |
| 37 | + <Label Text="Red" /> |
| 38 | + <BoxView Color="Red" VerticalOptions="FillAndExpand" /> |
| 39 | + </StackLayout> |
| 40 | + </ContentPage> |
| 41 | + <ContentPage> |
| 42 | + <StackLayout> |
| 43 | + <Label Text="Green" /> |
| 44 | + <BoxView Color="Green" VerticalOptions="FillAndExpand" /> |
| 45 | + </StackLayout> |
| 46 | + </ContentPage> |
| 47 | + <ContentPage> |
| 48 | + <StackLayout> |
| 49 | + <Label Text="Blue" /> |
| 50 | + <BoxView Color="Blue" VerticalOptions="FillAndExpand" /> |
| 51 | + </StackLayout> |
| 52 | + </ContentPage> |
| 53 | +</CarouselPage>]]></code> |
| 54 | + </example> |
| 55 | + <example> |
| 56 | + <para>The following C# example creates a <see cref="T:Xamarin.Forms.CarouselPage" /> that displays three simple <see cref="T:Xamarin.Forms.ContentPage" /> elements:</para> |
| 57 | + <code lang="C#"><![CDATA[ |
| 58 | +List<ContentPage> pages = new List<ContentPage> (0); |
| 59 | +Color[] colors = { Color.Red, Color.Green, Color.Blue }; |
| 60 | +foreach (Color c in colors) { |
| 61 | + pages.Add (new ContentPage { Content = new StackLayout { |
| 62 | + Children = { |
| 63 | + new Label { Text = c.ToString () }, |
| 64 | + new BoxView { |
| 65 | + Color = c, |
| 66 | + VerticalOptions = LayoutOptions.FillAndExpand |
| 67 | + } |
| 68 | + } |
| 69 | + } |
| 70 | + }); |
| 71 | +} |
| 72 | +
|
| 73 | +MainPage = new CarouselPage { |
| 74 | + Children = { pages [0], |
| 75 | + pages [1], |
| 76 | + pages [2] } |
| 77 | +}; |
| 78 | +]]></code> |
| 79 | + </example> |
| 80 | + <block subset="none" type="note">When embedding a CarouselPage into a <see cref="P:Xamarin.Forms.MasterDetailPage.Detail" />, application developers should set <see cref="P:Xamarin.Forms.MasterDetailPage.IsGestureEnabled" /> to <see langword="false" /> to prevent gesture conflicts between the CarouselPage and MasterDetailPage.</block> |
| 81 | + <para> |
| 82 | + <img href="CarouselPage.TripleScreenShot.png" /> |
| 83 | + </para> |
| 84 | + </remarks> |
| 85 | + </Docs> |
| 86 | + <Members> |
| 87 | + <Member MemberName=".ctor"> |
| 88 | + <MemberSignature Language="C#" Value="public CarouselPage ();" /> |
| 89 | + <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /> |
| 90 | + <MemberType>Constructor</MemberType> |
| 91 | + <AssemblyInfo> |
| 92 | + <AssemblyVersion>1.0.0.0</AssemblyVersion> |
| 93 | + <AssemblyVersion>1.1.0.0</AssemblyVersion> |
| 94 | + <AssemblyVersion>1.2.0.0</AssemblyVersion> |
| 95 | + <AssemblyVersion>1.3.0.0</AssemblyVersion> |
| 96 | + <AssemblyVersion>1.4.0.0</AssemblyVersion> |
| 97 | + <AssemblyVersion>1.5.0.0</AssemblyVersion> |
| 98 | + <AssemblyVersion>2.0.0.0</AssemblyVersion> |
| 99 | + </AssemblyInfo> |
| 100 | + <Parameters /> |
| 101 | + <Docs> |
| 102 | + <summary>Initializes a new instance of the CarouselPage class.</summary> |
| 103 | + <remarks> |
| 104 | + </remarks> |
| 105 | + </Docs> |
| 106 | + </Member> |
| 107 | + <Member MemberName="CreateDefault"> |
| 108 | + <MemberSignature Language="C#" Value="protected override Xamarin.Forms.ContentPage CreateDefault (object item);" /> |
| 109 | + <MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class Xamarin.Forms.ContentPage CreateDefault(object item) cil managed" /> |
| 110 | + <MemberType>Method</MemberType> |
| 111 | + <AssemblyInfo> |
| 112 | + <AssemblyVersion>1.0.0.0</AssemblyVersion> |
| 113 | + <AssemblyVersion>1.1.0.0</AssemblyVersion> |
| 114 | + <AssemblyVersion>1.2.0.0</AssemblyVersion> |
| 115 | + <AssemblyVersion>1.3.0.0</AssemblyVersion> |
| 116 | + <AssemblyVersion>1.4.0.0</AssemblyVersion> |
| 117 | + <AssemblyVersion>1.5.0.0</AssemblyVersion> |
| 118 | + <AssemblyVersion>2.0.0.0</AssemblyVersion> |
| 119 | + </AssemblyInfo> |
| 120 | + <ReturnValue> |
| 121 | + <ReturnType>Xamarin.Forms.ContentPage</ReturnType> |
| 122 | + </ReturnValue> |
| 123 | + <Parameters> |
| 124 | + <Parameter Name="item" Type="System.Object" /> |
| 125 | + </Parameters> |
| 126 | + <Docs> |
| 127 | + <param name="item">The object representing the model ofr the page.</param> |
| 128 | + <summary>Creates a default page, suitable for display in <c>this</c><see cref="T:Xamarin.Forms.CarouselPage" />, for an object.</summary> |
| 129 | + <returns>A page that is titled with the string value of <paramref name="item" />.</returns> |
| 130 | + <remarks>This returns a new <see cref="T:Xamarin.Forms.Page" /> object that has its <see cref="P:Xamarin.Forms.Page.Title" /> property set to the value of <see cref="M:Object.ToString" /> when called on <paramref name="item" />.</remarks> |
| 131 | + </Docs> |
| 132 | + </Member> |
| 133 | + </Members> |
| 134 | +</Type> |
0 commit comments