mirror of
https://github.com/bitwarden/mobile
synced 2025-12-27 13:43:32 +00:00
Extended controls
This commit is contained in:
13
src/App/Controls/BottomBorderEntry.cs
Normal file
13
src/App/Controls/BottomBorderEntry.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class BottomBorderEntry : ExtendedEntry
|
||||
{
|
||||
public BottomBorderEntry()
|
||||
{
|
||||
HasBorder = HasOnlyBottomBorder = true;
|
||||
BorderColor = Color.FromHex("d2d6de");
|
||||
}
|
||||
}
|
||||
}
|
||||
13
src/App/Controls/EntryLabel.cs
Normal file
13
src/App/Controls/EntryLabel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class EntryLabel : Label
|
||||
{
|
||||
public EntryLabel()
|
||||
{
|
||||
FontSize = 14;
|
||||
TextColor = Color.FromHex("777777");
|
||||
}
|
||||
}
|
||||
}
|
||||
53
src/App/Controls/ExtendedEntry.cs
Normal file
53
src/App/Controls/ExtendedEntry.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class ExtendedEntry : Entry
|
||||
{
|
||||
public static readonly BindableProperty HasBorderProperty =
|
||||
BindableProperty.Create(nameof(HasBorder), typeof(bool), typeof(ExtendedEntry), true);
|
||||
|
||||
public static readonly BindableProperty HasOnlyBottomBorderProperty =
|
||||
BindableProperty.Create(nameof(HasOnlyBottomBorder), typeof(bool), typeof(ExtendedEntry), false);
|
||||
|
||||
public static readonly BindableProperty BorderColorProperty =
|
||||
BindableProperty.Create(nameof(BorderColor), typeof(Color), typeof(ExtendedEntry), Color.Default);
|
||||
|
||||
public static readonly BindableProperty PlaceholderTextColorProperty =
|
||||
BindableProperty.Create(nameof(PlaceholderTextColor), typeof(Color), typeof(ExtendedEntry), Color.Default);
|
||||
|
||||
public static readonly BindableProperty MaxLengthProperty =
|
||||
BindableProperty.Create(nameof(MaxLength), typeof(int), typeof(ExtendedEntry), int.MaxValue);
|
||||
|
||||
public bool HasBorder
|
||||
{
|
||||
get { return (bool)GetValue(HasBorderProperty); }
|
||||
set { SetValue(HasBorderProperty, value); }
|
||||
}
|
||||
|
||||
public bool HasOnlyBottomBorder
|
||||
{
|
||||
get { return (bool)GetValue(HasOnlyBottomBorderProperty); }
|
||||
set { SetValue(HasOnlyBottomBorderProperty, value); }
|
||||
}
|
||||
|
||||
public Color BorderColor
|
||||
{
|
||||
get { return (Color)GetValue(BorderColorProperty); }
|
||||
set { SetValue(BorderColorProperty, value); }
|
||||
}
|
||||
|
||||
public Color PlaceholderTextColor
|
||||
{
|
||||
get { return (Color)GetValue(PlaceholderTextColorProperty); }
|
||||
set { SetValue(PlaceholderTextColorProperty, value); }
|
||||
}
|
||||
|
||||
public int MaxLength
|
||||
{
|
||||
get { return (int)GetValue(MaxLengthProperty); }
|
||||
set { SetValue(MaxLengthProperty, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
26
src/App/Controls/ExtendedTabbedPage.cs
Normal file
26
src/App/Controls/ExtendedTabbedPage.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class ExtendedTabbedPage : TabbedPage
|
||||
{
|
||||
public static readonly BindableProperty TintColorProperty =
|
||||
BindableProperty.Create(nameof(TintColor), typeof(Color), typeof(ExtendedTabbedPage), Color.White);
|
||||
|
||||
public static readonly BindableProperty BarTintColorProperty =
|
||||
BindableProperty.Create(nameof(BarTintColor), typeof(Color), typeof(ExtendedTabbedPage), Color.White);
|
||||
|
||||
public Color TintColor
|
||||
{
|
||||
get { return (Color)GetValue(TintColorProperty); }
|
||||
set { SetValue(TintColorProperty, value); }
|
||||
}
|
||||
|
||||
public Color BarTintColor
|
||||
{
|
||||
get { return (Color)GetValue(BarTintColorProperty); }
|
||||
set { SetValue(BarTintColorProperty, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user