summaryrefslogtreecommitdiff
path: root/docs/Xamarin.Forms.Core/ns-Xamarin.Forms.xml
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-03-22 20:02:25 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-03-22 23:13:41 (GMT)
commit17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch)
treeb5e5073a2a7b15cdbe826faa5c763e270a505729 /docs/Xamarin.Forms.Core/ns-Xamarin.Forms.xml
downloadxamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2
Initial import
Diffstat (limited to 'docs/Xamarin.Forms.Core/ns-Xamarin.Forms.xml')
-rw-r--r--docs/Xamarin.Forms.Core/ns-Xamarin.Forms.xml103
1 files changed, 103 insertions, 0 deletions
diff --git a/docs/Xamarin.Forms.Core/ns-Xamarin.Forms.xml b/docs/Xamarin.Forms.Core/ns-Xamarin.Forms.xml
new file mode 100644
index 0000000..b6de460
--- /dev/null
+++ b/docs/Xamarin.Forms.Core/ns-Xamarin.Forms.xml
@@ -0,0 +1,103 @@
+<Namespace Name="Xamarin.Forms">
+ <Docs>
+ <summary>Cross-platform, natively-backed UI toolkit.</summary>
+ <remarks>
+ <para>Xamarin.Forms is a cross-platform, natively-backed UI toolkit abstraction that allows developers to create user interfaces that can be shared across Android, iOS, and Windows Phone. Because the user interfaces use the native controls of the target platforms, they have the appearance and, importantly, the responsiveness of natively built apps.</para>
+ <format type="text/html">
+ <h2>Hello, Xamarin.Forms!</h2>
+ </format>
+ <para>The user-experience of a Xamarin.Forms application is usually defined in a cross-platform shared project (either a Portable Class Library or a Shared Project) and combined with platform-specific projects that, at the least, initialize the native platform rendering (note the call to <c>Forms.Init()</c> in the platform code samples below) and, more generally, extend the user-experience and user-interface in platform-specific manners (for instance, by accessing platform-specific sensors or capabilities).</para>
+ <para>The dependencies are one-way: the platforms depend on the shared project, but not vice-versa:</para>
+ <para><img href="XamarinForms-ns.SharedProject.png"/></para>
+ <para>
+ The Solution Explorer for a cross-platform "Hello, World!" app might look like this:</para>
+ <para><img href="XamarinForms-ns.SolutionPad.png"/></para>
+ <para>The shared portion of the Xamarin.Forms code might look like this:</para>
+ <example>
+ <code lang="C#"><![CDATA[
+public class App : Xamarin.Forms.Application
+{
+ public App ()
+ {
+ MainPage = new ContentPage
+ {
+ Content = new Label
+ {
+ Text = "Hello, Forms !",
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ },
+ };
+ }
+}
+ ]]></code>
+ </example>
+ <para>The iOS platform code would look like this:</para>
+ <example>
+ <code lang="C#"><![CDATA[
+[Register("AppDelegate")]
+public class AppDelegate : FormsApplicationDelegate
+{
+ UIWindow window;
+
+ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
+ {
+ Forms.Init();
+
+ LoadApplication (new App ());
+
+ return base.FinishedLaunching (app, options);
+ }
+}
+ ]]></code>
+ </example>
+ <para>The Android platform code would look like this:</para>
+ <example>
+ <code lang="C#"><![CDATA[
+[Activity(Label = "HelloXamarinFormsWorld", MainLauncher = true)]
+public class MainActivity : FormsApplicationActivity
+{
+ protected override void OnCreate(Bundle bundle)
+ {
+ base.OnCreate(bundle);
+
+ Forms.Init(this, bundle);
+
+ LoadApplication (new App ());
+ }
+}
+ ]]></code>
+ </example>
+ <para>And the Windows Phone code would look like this:</para>
+ <example>
+ <code lang="C#"><![CDATA[
+public partial class MainPage
+{
+ public MainPage()
+ {
+ InitializeComponent();
+
+ Forms.Init();
+
+ LoadApplication (new HelloXamarinFormsWorld.App ());
+ }
+}
+ ]]></code>
+ </example>
+ <para>The resulting app looks like this on the various devices:</para>
+ <para><img href="XamarinForms-ns.TripleScreenShot.png"/></para>
+ <format type="text/html">
+ <h2>Elements in Xamarin.Forms</h2>
+ </format>
+ <para>Important types in the Xamarin.Forms namespace include <see cref="T:Xamarin.Forms.Page"/>, <see cref="T:Xamarin.Forms.View"/>, and <see cref="T:Xamarin.Forms.Layout"/>. <see cref="T:Xamarin.Forms.Page"/>s typically correspond with controller objects (Activities in the Android world, UIViewControllers in the iOS world), <see cref="T:Xamarin.Forms.View"/>s with controls or widgets, and <see cref="T:Xamarin.Forms.Layout"/>s arrange <see cref="T:Xamarin.Forms.View"/>s on other <see cref="T:Xamarin.Forms.View"/>s. These types are all derived from <see cref="T:Xamarin.Forms.Element"/>.</para>
+ <format type="text/html">
+ <h2>Model-View-ViewModel and Xamarin.Forms</h2>
+ </format>
+ <para>Application developers use the Model-View-ViewModel (MVVM) pattern to create Xamarin.Forms apps that cleanly separate the concerns of data presentation and user interface from the concerns of data storage and manipulation. The <see cref="N:Xamarin.Forms" /> framework enables this by providing, among a few other related types, the <see cref="T:Xamarin.Forms.BindableObject" /> and <see cref="T:Xamarin.Forms.BindableProperty" /> classes. Objects that inherit from <see cref="T:Xamarin.Forms.BindableObject" /> can be bound to members of type <see cref="T:Xamarin.Forms.BindableProperty" /> on other objects.</para>
+ <para>A <see cref="T:Xamarin.Forms.BindableObject" /> maintains dictionary of <see cref="T:Xamarin.Forms.BindableProperty" /> names and an association with their corresponding binding contexts--simply the object on which the <see cref="T:Xamarin.Forms.BindableProperty" /> is defined and that the application developer has assigned to the <see cref="P:Xamarin.Forms.BindingObject.BindingContext" /> property--through a <see cref="T:Xamarin.Forms.Binding" />. See <see cref="T:Xamarin.Forms.BindableObject" /> for more information.</para>
+ </remarks>
+ <related type="article" href="http://developer.xamarin.com/guides/cross-platform/xamarin-forms/introduction-to-xamarin-forms/">Introduction to Xamarin.Forms</related>
+ <related type="article" href="http://developer.xamarin.com/guides/cross-platform/xamarin-forms/controls/">Xamarin.Forms View Gallery</related>
+
+ </Docs>
+</Namespace>