Last active
July 10, 2017 10:01
-
-
Save mmierzwa/618358f58ec200ee689b2626963d9c32 to your computer and use it in GitHub Desktop.
Placeholder text in Xamarin.Forms Editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms; | |
namespace EditorWithPlaceholder | |
{ | |
public class PlaceholderEditor : Editor | |
{ | |
public static BindableProperty PlaceholderProperty | |
= BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(PlaceholderEditor)); | |
public static BindableProperty PlaceholderColorProperty | |
= BindableProperty.Create(nameof(PlaceholderColor), typeof(Color), typeof(PlaceholderEditor), Color.Gray); | |
public string Placeholder | |
{ | |
get { return (string) GetValue(PlaceholderProperty); } | |
set { SetValue(PlaceholderProperty, value); } | |
} | |
public Color PlaceholderColor | |
{ | |
get { return (Color) GetValue(PlaceholderColorProperty); } | |
set { SetValue(PlaceholderColorProperty, value); } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment