Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP
Last active April 1, 2021 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeM-RP/3d0bd6f2275f34524e0ddafb23490867 to your computer and use it in GitHub Desktop.
Save JoeM-RP/3d0bd6f2275f34524e0ddafb23490867 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ios="clr-namespace:UIKit;assembly=Xamarin.iOS;targetPlatform=iOS"
xmlns:controls="clr-namespace:samples.core.Controls;assembly=samples.core"
x:Class="samples.core.Views.EntryMoveNextView">
<ContentPage.Resources>
<ResourceDictionary>
<Style x:Name="MyEntry" TargetType="Entry">
<Setter Property="HeightRequest" Value="45" />
</Style>
<Style TargetType="Label">
<Setter Property="Margin" Value="-15,20,-15,0"/>
<Setter Property="Padding" Value="15,4"/>
<Setter Property="BackgroundColor" Value="#cdcdcd"/>
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<ScrollView>
<StackLayout Padding="15,25">
<!-- ***************** -->
<!-- Next Entry Sample -->
<!-- ***************** -->
<Label Text="Next Entry Label Sample"/>
<Entry x:Name="Entry_First" ReturnType="Next" Placeholder="First Entry" HeightRequest="45"/>
<!-- Custom Entry with Toolbar Command -->
<controls:EntryMoveNextControl x:Name="Entry_Second" Placeholder="Second Entry" HeightRequest="45" Keyboard="Numeric" />
<Entry x:Name="Entry_Third" ReturnType="Done" Placeholder="Third Entry" HeightRequest="45"/>
<!-- ******************* -->
<!-- Multi-Picker Sample -->
<!-- ******************* -->
<Label Text="MultiPickerControl Sample"/>
<controls:MultiPickerControl x:Name="MultiPicker"/>
<BoxView/>
<Button Text="Save" VerticalOptions="End"/>
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>
namespace samples.core.Views
{
public partial class EntryMoveNextView : ContentPage
{
public EntryMoveNextView()
{
InitializeComponent();
Entry_First.ReturnCommand = new Command(() => Entry_Second.Focus());
// Custom entry "Next" behavior
Entry_Second.NextEntry = Entry_Third;
Entry_Second.Effects.Add(Effect.Resolve("Effects.EntryMoveNextEffect"));
// end
On<iOS>().SetUseSafeArea(true);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment