Skip to content

Instantly share code, notes, and snippets.

@icebeam7

icebeam7/CustomPicker.cs

Last active Dec 21, 2019
Embed
What would you like to do?
MyCustomPicker : CustomPicker.cs
using Xamarin.Forms;
namespace MyCustomPicker.Controls
{
public class CustomPicker : Picker
{
public static readonly BindableProperty ItemFontFamilyProperty =
BindableProperty.Create("ItemFontFamily", typeof(string), typeof(CustomPicker), defaultBindingMode: BindingMode.OneWay);
public string ItemFontFamily
{
get { return (string)GetValue(ItemFontFamilyProperty); }
set { SetValue(ItemFontFamilyProperty, value); }
}
public static readonly BindableProperty ItemColorProperty =
BindableProperty.Create("ItemColor", typeof(string), typeof(CustomPicker), defaultBindingMode: BindingMode.OneWay);
public string ItemColor
{
get { return (string)GetValue(ItemColorProperty); }
set { SetValue(ItemColorProperty, value); }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.