diff options
Diffstat (limited to 'docs/Xamarin.Forms.Core/Xamarin.Forms/BindableObjectExtensions.xml')
-rw-r--r-- | docs/Xamarin.Forms.Core/Xamarin.Forms/BindableObjectExtensions.xml | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/BindableObjectExtensions.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/BindableObjectExtensions.xml new file mode 100644 index 00000000..a37ea69f --- /dev/null +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/BindableObjectExtensions.xml @@ -0,0 +1,161 @@ +<Type Name="BindableObjectExtensions" FullName="Xamarin.Forms.BindableObjectExtensions"> + <TypeSignature Language="C#" Value="public static class BindableObjectExtensions" /> + <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit BindableObjectExtensions extends System.Object" /> + <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>System.Object</BaseTypeName> + </Base> + <Interfaces /> + <Docs> + <summary>Contains convenience extension methods for <see cref="T:Xamarin.Forms.BindableObject" />.</summary> + <remarks> + </remarks> + </Docs> + <Members> + <Member MemberName="SetBinding"> + <MemberSignature Language="C#" Value="public static void SetBinding (this Xamarin.Forms.BindableObject self, Xamarin.Forms.BindableProperty targetProperty, string path);" /> + <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetBinding(class Xamarin.Forms.BindableObject self, class Xamarin.Forms.BindableProperty targetProperty, string path) cil managed" /> + <MemberType>Method</MemberType> + <AssemblyInfo> + <AssemblyVersion>1.0.0.0</AssemblyVersion> + <AssemblyVersion>1.1.0.0</AssemblyVersion> + </AssemblyInfo> + <ReturnValue> + <ReturnType>System.Void</ReturnType> + </ReturnValue> + <Parameters> + <Parameter Name="self" Type="Xamarin.Forms.BindableObject" RefType="this" /> + <Parameter Name="targetProperty" Type="Xamarin.Forms.BindableProperty" /> + <Parameter Name="path" Type="System.String" /> + </Parameters> + <Docs> + <param name="self">The <see cref="T:Xamarin.Forms.BindableObject" />.</param> + <param name="targetProperty">The BindableProperty on which to set a binding.</param> + <param name="path">A <see cref="T:System.String" /> indicating the property path to bind to.</param> + <summary>Creates and applies a binding to a property.</summary> + <remarks> + <para>The following example shows how to use the extension method to set a binding.</para> + <example> + <code lang="C#"><![CDATA[ +var label = new Label (); +label.SetBinding (Label.TextProperty, "Name"); +label.BindingContext = new {Name = "John Doe", Company = "Xamarin"}; +Debug.WriteLine (label.Text); //prints "John Doe" + ]]></code> + </example> + </remarks> + </Docs> + </Member> + <Member MemberName="SetBinding"> + <MemberSignature Language="C#" Value="public static void SetBinding (this Xamarin.Forms.BindableObject self, Xamarin.Forms.BindableProperty targetProperty, string path, Xamarin.Forms.BindingMode mode = Xamarin.Forms.BindingMode.Default, Xamarin.Forms.IValueConverter converter = null, string stringFormat = null);" /> + <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetBinding(class Xamarin.Forms.BindableObject self, class Xamarin.Forms.BindableProperty targetProperty, string path, valuetype Xamarin.Forms.BindingMode mode, class Xamarin.Forms.IValueConverter converter, string stringFormat) cil managed" /> + <MemberType>Method</MemberType> + <AssemblyInfo> + <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>System.Void</ReturnType> + </ReturnValue> + <Parameters> + <Parameter Name="self" Type="Xamarin.Forms.BindableObject" RefType="this" /> + <Parameter Name="targetProperty" Type="Xamarin.Forms.BindableProperty" /> + <Parameter Name="path" Type="System.String" /> + <Parameter Name="mode" Type="Xamarin.Forms.BindingMode" /> + <Parameter Name="converter" Type="Xamarin.Forms.IValueConverter" /> + <Parameter Name="stringFormat" Type="System.String" /> + </Parameters> + <Docs> + <param name="self">The <see cref="T:Xamarin.Forms.BindableObject" />.</param> + <param name="targetProperty">The BindableProperty on which to set a bindinge.</param> + <param name="path">A <see cref="T:System.String" /> indicating the property path to bind to.</param> + <param name="mode">The <see cref="T:Xamarin.Forms.BindingMode" /> for the binding. This parameter is optional. Default is <see cref="E:Xamarin.Forms.BindingMode.Default" />.</param> + <param name="converter">An <see cref="T:Xamarin.Forms.IValueConverter" /> for the binding. This parameter is optional. Default is <see langword="null" />.</param> + <param name="stringFormat">A string used as stringFormat for the binding. This parameter is optional. Default is <see langword="null" />.</param> + <summary>Creates and applies a binding to a property.</summary> + <remarks> + <para>The following example shows how to use the extension method to set a binding.</para> + <example> + <code lang="C#"><![CDATA[ +var label = new Label (); +label.SetBinding (Label.TextProperty, "Name"); +label.BindingContext = new {Name = "John Doe", Company = "Xamarin"}; +Debug.WriteLine (label.Text); //prints "John Doe" + ]]></code> + </example> + </remarks> + </Docs> + </Member> + <Member MemberName="SetBinding<TSource>"> + <MemberSignature Language="C#" Value="public static void SetBinding<TSource> (this Xamarin.Forms.BindableObject self, Xamarin.Forms.BindableProperty targetProperty, System.Linq.Expressions.Expression<Func<TSource,object>> sourceProperty, Xamarin.Forms.BindingMode mode = Xamarin.Forms.BindingMode.Default, Xamarin.Forms.IValueConverter converter = null, string stringFormat = null);" /> + <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetBinding<TSource>(class Xamarin.Forms.BindableObject self, class Xamarin.Forms.BindableProperty targetProperty, class System.Linq.Expressions.Expression`1<class System.Func`2<!!TSource, object>> sourceProperty, valuetype Xamarin.Forms.BindingMode mode, class Xamarin.Forms.IValueConverter converter, string stringFormat) cil managed" /> + <MemberType>Method</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>System.Void</ReturnType> + </ReturnValue> + <TypeParameters> + <TypeParameter Name="TSource" /> + </TypeParameters> + <Parameters> + <Parameter Name="self" Type="Xamarin.Forms.BindableObject" RefType="this" /> + <Parameter Name="targetProperty" Type="Xamarin.Forms.BindableProperty" /> + <Parameter Name="sourceProperty" Type="System.Linq.Expressions.Expression<System.Func<TSource,System.Object>>" /> + <Parameter Name="mode" Type="Xamarin.Forms.BindingMode" /> + <Parameter Name="converter" Type="Xamarin.Forms.IValueConverter" /> + <Parameter Name="stringFormat" Type="System.String" /> + </Parameters> + <Docs> + <typeparam name="TSource">The source type.</typeparam> + <param name="self">The BindableObject.</param> + <param name="targetProperty">The BindableProperty to bind to</param> + <param name="sourceProperty">An expression used to retrieve the source path.</param> + <param name="mode">The BindingMode for the binding. This parameter is optional. Default is <see cref="E:Xamarin.Forms.BindingMode.Default" />.</param> + <param name="converter">An IValueConverter for the binding. This parameter is optional. Default is <see langword="null" />.</param> + <param name="stringFormat">A string used as stringFormat for the binding. This parameter is optional. Default is <see langword="null" />.</param> + <summary>Creates and applies a binding from an expression.</summary> + <remarks> + <para>This extension method uses Expression instead of path to creates and sets bindings. Using Expressions is more refactoring friendly.</para> + <para>This following example illustrates the setting of a binding using the extension method.</para> + <example> + <code lang="C#"><![CDATA[ +public class PersonViewModel +{ + public string Name { get; set; } + public string Company { get; set; } +} + +var label = new Label (); +label.SetBinding<PersonViewModel> (Label.TextProperty, vm => vm.Name); +label.BindingContext = new PersonViewModel { + Name = "John Doe", + Company = "Xamarin" +}; +Debug.WriteLine (label.Text); //prints "John Doe" + ]]></code> + </example> + </remarks> + </Docs> + </Member> + </Members> +</Type> |