diff options
-rw-r--r-- | Xamarin.Forms.Core/Entry.cs | 4 | ||||
-rw-r--r-- | Xamarin.Forms.Core/IEntryController.cs | 7 | ||||
-rw-r--r-- | Xamarin.Forms.Core/Xamarin.Forms.Core.csproj | 1 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs | 2 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.WP8/EntryRenderer.cs | 2 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.WinRT/EntryRenderer.cs | 2 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs | 2 | ||||
-rw-r--r-- | docs/Xamarin.Forms.Core/Xamarin.Forms/Entry.xml | 26 | ||||
-rw-r--r-- | docs/Xamarin.Forms.Core/Xamarin.Forms/IEntryController.xml | 31 |
9 files changed, 68 insertions, 9 deletions
diff --git a/Xamarin.Forms.Core/Entry.cs b/Xamarin.Forms.Core/Entry.cs index ef10e963..1ee2f856 100644 --- a/Xamarin.Forms.Core/Entry.cs +++ b/Xamarin.Forms.Core/Entry.cs @@ -4,7 +4,7 @@ using Xamarin.Forms.Platform; namespace Xamarin.Forms { [RenderWith(typeof(_EntryRenderer))] - public class Entry : InputView, IFontElement + public class Entry : InputView, IFontElement, IEntryController { public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create("Placeholder", typeof(string), typeof(Entry), default(string)); @@ -84,7 +84,7 @@ namespace Xamarin.Forms public event EventHandler<TextChangedEventArgs> TextChanged; - internal void SendCompleted() + void IEntryController.SendCompleted() { Completed?.Invoke(this, EventArgs.Empty); } diff --git a/Xamarin.Forms.Core/IEntryController.cs b/Xamarin.Forms.Core/IEntryController.cs new file mode 100644 index 00000000..4db63384 --- /dev/null +++ b/Xamarin.Forms.Core/IEntryController.cs @@ -0,0 +1,7 @@ +namespace Xamarin.Forms +{ + public interface IEntryController + { + void SendCompleted(); + } +}
\ 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 dbd109a6..77503f83 100644 --- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj +++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj @@ -92,6 +92,7 @@ <Compile Include="ElementEventArgs.cs" /> <Compile Include="ElementTemplate.cs" /> <Compile Include="EmailKeyboard.cs" /> + <Compile Include="IEntryController.cs" /> <Compile Include="Internals\EvalRequested.cs" /> <Compile Include="ExportEffectAttribute.cs" /> <Compile Include="ExpressionSearch.cs" /> diff --git a/Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs index 24824536..c1b0b5e3 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs @@ -27,7 +27,7 @@ namespace Xamarin.Forms.Platform.Android { Control.ClearFocus(); v.HideKeyboard(); - Element.SendCompleted(); + ((IEntryController)Element).SendCompleted(); } return true; diff --git a/Xamarin.Forms.Platform.WP8/EntryRenderer.cs b/Xamarin.Forms.Platform.WP8/EntryRenderer.cs index f96ca312..b2749c05 100644 --- a/Xamarin.Forms.Platform.WP8/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.WP8/EntryRenderer.cs @@ -181,7 +181,7 @@ namespace Xamarin.Forms.Platform.WinPhone void TextBoxOnKeyUp(object sender, KeyEventArgs keyEventArgs) { if (keyEventArgs.Key == Key.Enter) - Element.SendCompleted(); + ((IEntryController)Element).SendCompleted(); } void TextBoxOnTextChanged(object sender, System.Windows.Controls.TextChangedEventArgs textChangedEventArgs) diff --git a/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs b/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs index 1a9fa767..f9f0b3a2 100644 --- a/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs @@ -122,7 +122,7 @@ namespace Xamarin.Forms.Platform.WinRT if (args?.Key != VirtualKey.Enter) return; - Element.SendCompleted(); + ((IEntryController)Element).SendCompleted(); } void UpdateAlignment() diff --git a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs index 734a56be..2e8908a5 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs @@ -115,7 +115,7 @@ namespace Xamarin.Forms.Platform.iOS bool OnShouldReturn(UITextField view) { Control.ResignFirstResponder(); - Element.SendCompleted(); + ((IEntryController)Element).SendCompleted(); return true; } diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/Entry.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/Entry.xml index a176db57..7297e9c2 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/Entry.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/Entry.xml @@ -1,6 +1,6 @@ <Type Name="Entry" FullName="Xamarin.Forms.Entry"> - <TypeSignature Language="C#" Value="public class Entry : Xamarin.Forms.InputView" /> - <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Entry extends Xamarin.Forms.InputView" /> + <TypeSignature Language="C#" Value="public class Entry : Xamarin.Forms.InputView, Xamarin.Forms.IEntryController" /> + <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Entry extends Xamarin.Forms.InputView implements class Xamarin.Forms.IEntryController" /> <AssemblyInfo> <AssemblyName>Xamarin.Forms.Core</AssemblyName> <AssemblyVersion>1.0.0.0</AssemblyVersion> @@ -14,7 +14,11 @@ <Base> <BaseTypeName>Xamarin.Forms.InputView</BaseTypeName> </Base> - <Interfaces /> + <Interfaces> + <Interface> + <InterfaceName>Xamarin.Forms.IEntryController</InterfaceName> + </Interface> + </Interfaces> <Attributes> <Attribute> <AttributeName>Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._EntryRenderer))</AttributeName> @@ -492,5 +496,21 @@ View CreateLoginForm () </remarks> </Docs> </Member> + <Member MemberName="Xamarin.Forms.IEntryController.SendCompleted"> + <MemberSignature Language="C#" Value="void IEntryController.SendCompleted ();" /> + <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void Xamarin.Forms.IEntryController.SendCompleted() cil managed" /> + <MemberType>Method</MemberType> + <AssemblyInfo> + <AssemblyVersion>2.0.0.0</AssemblyVersion> + </AssemblyInfo> + <ReturnValue> + <ReturnType>System.Void</ReturnType> + </ReturnValue> + <Parameters /> + <Docs> + <summary>To be added.</summary> + <remarks>To be added.</remarks> + </Docs> + </Member> </Members> </Type> diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/IEntryController.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/IEntryController.xml new file mode 100644 index 00000000..4e4d451f --- /dev/null +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/IEntryController.xml @@ -0,0 +1,31 @@ +<Type Name="IEntryController" FullName="Xamarin.Forms.IEntryController"> + <TypeSignature Language="C#" Value="public interface IEntryController" /> + <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IEntryController" /> + <AssemblyInfo> + <AssemblyName>Xamarin.Forms.Core</AssemblyName> + <AssemblyVersion>2.0.0.0</AssemblyVersion> + </AssemblyInfo> + <Interfaces /> + <Docs> + <summary>To be added.</summary> + <remarks>To be added.</remarks> + </Docs> + <Members> + <Member MemberName="SendCompleted"> + <MemberSignature Language="C#" Value="public void SendCompleted ();" /> + <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void SendCompleted() cil managed" /> + <MemberType>Method</MemberType> + <AssemblyInfo> + <AssemblyVersion>2.0.0.0</AssemblyVersion> + </AssemblyInfo> + <ReturnValue> + <ReturnType>System.Void</ReturnType> + </ReturnValue> + <Parameters /> + <Docs> + <summary>To be added.</summary> + <remarks>To be added.</remarks> + </Docs> + </Member> + </Members> +</Type> |