bitwarden-android/src/App/Controls/FormEditorCell.cs

41 lines
926 B
C#
Raw Normal View History

using System;
using Xamarin.Forms;
namespace Bit.App.Controls
{
public class FormEditorCell : ExtendedViewCell
{
public FormEditorCell(Keyboard entryKeyboard = null, double? height = null)
{
Editor = new ExtendedEditor
{
Keyboard = entryKeyboard,
HasBorder = false
};
if(height.HasValue)
{
Editor.HeightRequest = height.Value;
}
var stackLayout = new StackLayout
{
Padding = new Thickness(15, 10)
};
stackLayout.Children.Add(Editor);
2016-07-05 05:35:49 +03:00
Tapped += FormEditorCell_Tapped;
View = stackLayout;
}
public ExtendedEditor Editor { get; private set; }
2016-07-05 05:35:49 +03:00
private void FormEditorCell_Tapped(object sender, EventArgs e)
{
Editor.Focus();
}
}
}