summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Picker.cs30
-rw-r--r--Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/UpdateMode.cs8
-rw-r--r--Xamarin.Forms.Core/Xamarin.Forms.Core.csproj2
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs5
-rw-r--r--docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Picker.xml116
-rw-r--r--docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/UpdateMode.xml45
6 files changed, 205 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Picker.cs b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Picker.cs
new file mode 100644
index 00000000..74b7db69
--- /dev/null
+++ b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Picker.cs
@@ -0,0 +1,30 @@
+namespace Xamarin.Forms.PlatformConfiguration.iOSSpecific
+{
+ using FormsElement = Forms.Picker;
+
+ public static class Picker
+ {
+ public static readonly BindableProperty UpdateModeProperty = BindableProperty.Create(nameof(UpdateMode), typeof(UpdateMode), typeof(Picker), default(UpdateMode));
+
+ public static UpdateMode GetUpdateMode(BindableObject element)
+ {
+ return (UpdateMode)element.GetValue(UpdateModeProperty);
+ }
+
+ public static void SetUpdateMode(BindableObject element, UpdateMode value)
+ {
+ element.SetValue(UpdateModeProperty, value);
+ }
+
+ public static UpdateMode UpdateMode(this IPlatformElementConfiguration<iOS, FormsElement> config)
+ {
+ return GetUpdateMode(config.Element);
+ }
+
+ public static IPlatformElementConfiguration<iOS, FormsElement> SetUpdateMode(this IPlatformElementConfiguration<iOS, FormsElement> config, UpdateMode value)
+ {
+ SetUpdateMode(config.Element, value);
+ return config;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/UpdateMode.cs b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/UpdateMode.cs
new file mode 100644
index 00000000..c429a163
--- /dev/null
+++ b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/UpdateMode.cs
@@ -0,0 +1,8 @@
+namespace Xamarin.Forms.PlatformConfiguration.iOSSpecific
+{
+ public enum UpdateMode
+ {
+ Immediately,
+ WhenFinished
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
index a6540c1b..dd01d4b2 100644
--- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
+++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
@@ -94,10 +94,12 @@
<Compile Include="PlatformConfiguration\iOSSpecific\BlurEffectStyle.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\Entry.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\NavigationPage.cs" />
+ <Compile Include="PlatformConfiguration\iOSSpecific\Picker.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\StatusBarTextColorMode.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\Page.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\StatusBarHiddenMode.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\UIStatusBarAnimation.cs" />
+ <Compile Include="PlatformConfiguration\iOSSpecific\UpdateMode.cs" />
<Compile Include="PlatformConfiguration\iOSSpecific\VisualElement.cs" />
<Compile Include="PlatformConfiguration\WindowsSpecific\MasterDetailPage.cs" />
<Compile Include="PlatformConfiguration\WindowsSpecific\CollapseStyle.cs" />
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
index 169ac3ed..c0f10d10 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Specialized;
using System.ComponentModel;
using UIKit;
+using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
using RectangleF = CoreGraphics.CGRect;
namespace Xamarin.Forms.Platform.iOS
@@ -178,7 +179,9 @@ namespace Xamarin.Forms.Platform.iOS
SelectedItem = _renderer.Element.Items[(int)row];
SelectedIndex = (int)row;
}
- _renderer.UpdatePickerFromModel(this);
+
+ if(_renderer.Element.On<PlatformConfiguration.iOS>().UpdateMode() == UpdateMode.Immediately)
+ _renderer.UpdatePickerFromModel(this);
}
}
}
diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Picker.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Picker.xml
new file mode 100644
index 00000000..9ea460a7
--- /dev/null
+++ b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Picker.xml
@@ -0,0 +1,116 @@
+<Type Name="Picker" FullName="Xamarin.Forms.PlatformConfiguration.iOSSpecific.Picker">
+ <TypeSignature Language="C#" Value="public static class Picker" />
+ <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Picker extends System.Object" />
+ <AssemblyInfo>
+ <AssemblyName>Xamarin.Forms.Core</AssemblyName>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>System.Object</BaseTypeName>
+ </Base>
+ <Interfaces />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ <Members>
+ <Member MemberName="UpdateModeProperty">
+ <MemberSignature Language="C#" Value="public static readonly Xamarin.Forms.BindableProperty UpdateModeProperty;" />
+ <MemberSignature Language="ILAsm" Value=".field public static initonly class Xamarin.Forms.BindableProperty UpdateModeProperty" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.BindableProperty</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="GetUpdateMode">
+ <MemberSignature Language="C#" Value="public static Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode GetUpdateMode (Xamarin.Forms.BindableObject element);" />
+ <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode GetUpdateMode(class Xamarin.Forms.BindableObject element) cil managed" />
+ <MemberType>Method</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode</ReturnType>
+ </ReturnValue>
+ <Parameters>
+ <Parameter Name="element" Type="Xamarin.Forms.BindableObject" />
+ </Parameters>
+ <Docs>
+ <param name="element">To be added.</param>
+ <summary>To be added.</summary>
+ <returns>To be added.</returns>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="SetUpdateMode">
+ <MemberSignature Language="C#" Value="public static void SetUpdateMode (Xamarin.Forms.BindableObject element, Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode value);" />
+ <MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetUpdateMode(class Xamarin.Forms.BindableObject element, valuetype Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode value) cil managed" />
+ <MemberType>Method</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>System.Void</ReturnType>
+ </ReturnValue>
+ <Parameters>
+ <Parameter Name="element" Type="Xamarin.Forms.BindableObject" />
+ <Parameter Name="value" Type="Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode" />
+ </Parameters>
+ <Docs>
+ <param name="element">To be added.</param>
+ <param name="value">To be added.</param>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="UpdateMode">
+ <MemberSignature Language="C#" Value="public static Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode UpdateMode (this Xamarin.Forms.IPlatformElementConfiguration&lt;Xamarin.Forms.PlatformConfiguration.iOS,Xamarin.Forms.Picker&gt; config);" />
+ <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode UpdateMode(class Xamarin.Forms.IPlatformElementConfiguration`2&lt;class Xamarin.Forms.PlatformConfiguration.iOS, class Xamarin.Forms.Picker&gt; config) cil managed" />
+ <MemberType>Method</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode</ReturnType>
+ </ReturnValue>
+ <Parameters>
+ <Parameter Name="config" Type="Xamarin.Forms.IPlatformElementConfiguration&lt;Xamarin.Forms.PlatformConfiguration.iOS,Xamarin.Forms.Picker&gt;" RefType="this" />
+ </Parameters>
+ <Docs>
+ <param name="config">To be added.</param>
+ <summary>To be added.</summary>
+ <returns>To be added.</returns>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ <Member MemberName="SetUpdateMode">
+ <MemberSignature Language="C#" Value="public static Xamarin.Forms.IPlatformElementConfiguration&lt;Xamarin.Forms.PlatformConfiguration.iOS,Xamarin.Forms.Picker&gt; SetUpdateMode (this Xamarin.Forms.IPlatformElementConfiguration&lt;Xamarin.Forms.PlatformConfiguration.iOS,Xamarin.Forms.Picker&gt; config, Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode value);" />
+ <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Xamarin.Forms.IPlatformElementConfiguration`2&lt;class Xamarin.Forms.PlatformConfiguration.iOS, class Xamarin.Forms.Picker&gt; SetUpdateMode(class Xamarin.Forms.IPlatformElementConfiguration`2&lt;class Xamarin.Forms.PlatformConfiguration.iOS, class Xamarin.Forms.Picker&gt; config, valuetype Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode value) cil managed" />
+ <MemberType>Method</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.IPlatformElementConfiguration&lt;Xamarin.Forms.PlatformConfiguration.iOS,Xamarin.Forms.Picker&gt;</ReturnType>
+ </ReturnValue>
+ <Parameters>
+ <Parameter Name="config" Type="Xamarin.Forms.IPlatformElementConfiguration&lt;Xamarin.Forms.PlatformConfiguration.iOS,Xamarin.Forms.Picker&gt;" RefType="this" />
+ <Parameter Name="value" Type="Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode" />
+ </Parameters>
+ <Docs>
+ <param name="config">To be added.</param>
+ <param name="value">To be added.</param>
+ <summary>To be added.</summary>
+ <returns>To be added.</returns>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ </Members>
+</Type> \ No newline at end of file
diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/UpdateMode.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/UpdateMode.xml
new file mode 100644
index 00000000..c5b01cad
--- /dev/null
+++ b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/UpdateMode.xml
@@ -0,0 +1,45 @@
+<Type Name="UpdateMode" FullName="Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode">
+ <TypeSignature Language="C#" Value="public enum UpdateMode" />
+ <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed UpdateMode extends System.Enum" />
+ <AssemblyInfo>
+ <AssemblyName>Xamarin.Forms.Core</AssemblyName>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>System.Enum</BaseTypeName>
+ </Base>
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ <Members>
+ <Member MemberName="WhenFinished">
+ <MemberSignature Language="C#" Value="WhenFinished" />
+ <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode WhenFinished = int32(1)" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ </Docs>
+ </Member>
+ <Member MemberName="Immediately">
+ <MemberSignature Language="C#" Value="Immediately" />
+ <MemberSignature Language="ILAsm" Value=".field public static literal valuetype Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode Immediately = int32(0)" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Xamarin.Forms.PlatformConfiguration.iOSSpecific.UpdateMode</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ </Docs>
+ </Member>
+ </Members>
+</Type> \ No newline at end of file