public static readonly BindableProperty FontAttributesProperty = FontElement.FontAttributesProperty;
- public static readonly BindableProperty BorderWidthProperty = BindableProperty.Create("BorderWidth", typeof(double), typeof(Button), -1d);
-
- public static readonly BindableProperty BorderColorProperty = BorderElement.BorderColorProperty;
-
- [Obsolete("BorderRadiusProperty is obsolete as of 2.5.0. Please use CornerRadius instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BorderRadiusProperty = BindableProperty.Create("BorderRadius", typeof(int), typeof(Button), defaultValue: DefaultBorderRadius,
- propertyChanged: BorderRadiusPropertyChanged);
-
- public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create("CornerRadius", typeof(int), typeof(Button), defaultValue: BorderElement.DefaultCornerRadius,
- propertyChanged: CornerRadiusPropertyChanged);
-
public static readonly BindableProperty ImageSourceProperty = ImageElement.ImageProperty;
[Obsolete("ImageProperty is obsolete as of 4.0.0. Please use ImageSourceProperty instead.")]
InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
}
-
- internal static readonly BindablePropertyKey IsPressedPropertyKey = BindableProperty.CreateReadOnly(nameof(IsPressed), typeof(bool), typeof(Button), default(bool));
- public static readonly BindableProperty IsPressedProperty = IsPressedPropertyKey.BindableProperty;
-
-
readonly Lazy<PlatformConfigurationRegistry<Button>> _platformConfigurationRegistry;
- public Color BorderColor
- {
- get { return (Color)GetValue(BorderElement.BorderColorProperty); }
- set { SetValue(BorderElement.BorderColorProperty, value); }
- }
-
- [Obsolete("BorderRadius is obsolete as of 2.5.0. Please use CornerRadius instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public int BorderRadius
- {
- get { return (int)GetValue(BorderRadiusProperty); }
- set { SetValue(BorderRadiusProperty, value); }
- }
+ public Color BorderColor { get; set; }
- public int CornerRadius
- {
- get { return (int)GetValue(CornerRadiusProperty); }
- set { SetValue(CornerRadiusProperty, value); }
- }
+ public int CornerRadius { get; set; }
- public double BorderWidth
- {
- get { return (double)GetValue(BorderWidthProperty); }
- set { SetValue(BorderWidthProperty, value); }
- }
+ public double BorderWidth { get; set; }
public ButtonContentLayout ContentLayout
{
[EditorBrowsable(EditorBrowsableState.Never)]
public void SendClicked() => ButtonElement.ElementClicked(this, this);
- public bool IsPressed => (bool)GetValue(IsPressedProperty);
+ public bool IsPressed => false;
[EditorBrowsable(EditorBrowsableState.Never)]
- void IButtonElement.SetIsPressed(bool isPressed) => SetValue(IsPressedPropertyKey, isPressed);
+ void IButtonElement.SetIsPressed(bool isPressed) { }
[EditorBrowsable(EditorBrowsableState.Never)]
public void SendPressed() => ButtonElement.ElementPressed(this, this);
ImageSource IImageElement.Source => ImageSource;
bool IImageElement.IsOpaque => false;
-
void IImageElement.RaiseImageSourcePropertyChanged() => OnPropertyChanged(ImageSourceProperty.PropertyName);
- int IBorderElement.CornerRadiusDefaultValue => (int)CornerRadiusProperty.DefaultValue;
-
- Color IBorderElement.BorderColorDefaultValue => (Color)BorderColorProperty.DefaultValue;
-
- double IBorderElement.BorderWidthDefaultValue => (double)BorderWidthProperty.DefaultValue;
-
-
- /// <summary>
- /// Flag to prevent overwriting the value of CornerRadius
- /// </summary>
- bool cornerOrBorderRadiusSetting = false;
-
- static void BorderRadiusPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
- {
- if (newvalue == oldvalue)
- return;
-
- var button = (Button)bindable;
- var val = (int)newvalue;
- if (val == DefaultBorderRadius && !button.cornerOrBorderRadiusSetting)
- val = BorderElement.DefaultCornerRadius;
+ int IBorderElement.CornerRadiusDefaultValue => (int)BorderElement.DefaultCornerRadius;
- var oldVal = (int)bindable.GetValue(Button.CornerRadiusProperty);
+ Color IBorderElement.BorderColorDefaultValue => (Color)BorderElement.BorderColorProperty.DefaultValue;
- if (oldVal == val)
- return;
-
- if (button.cornerOrBorderRadiusSetting) // retain until BorderRadiusProperty removed
- return;
-
- button.cornerOrBorderRadiusSetting = true;
- bindable.SetValue(Button.CornerRadiusProperty, val);
- button.cornerOrBorderRadiusSetting = false;
- }
-
- static void CornerRadiusPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
- {
- if (newvalue == oldvalue)
- return;
-
- var button = (Button)bindable;
- var val = (int)newvalue;
- if (val == BorderElement.DefaultCornerRadius && !button.cornerOrBorderRadiusSetting)
- val = DefaultBorderRadius;
-
-#pragma warning disable 0618 // retain until BorderRadiusProperty removed
- var oldVal = (int)bindable.GetValue(Button.BorderRadiusProperty);
-#pragma warning restore
-
- if (oldVal == val)
- return;
-
-#pragma warning disable 0618 // retain until BorderRadiusProperty removed
- button.cornerOrBorderRadiusSetting = true;
- bindable.SetValue(Button.BorderRadiusProperty, val);
- button.cornerOrBorderRadiusSetting = false;
-#pragma warning restore
- }
+ double IBorderElement.BorderWidthDefaultValue => (double)-1d;
void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue)
{
void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
{
- InvalidateMeasure();
}
-
void IBorderElement.OnBorderColorPropertyChanged(Color oldValue, Color newValue)
{
}
-
bool IImageController.GetLoadAsAnimation() => false;
bool IImageElement.IsLoading => false;
{
}
- bool IBorderElement.IsCornerRadiusSet() => IsSet(CornerRadiusProperty);
- bool IBorderElement.IsBackgroundColorSet() => IsSet(BackgroundColorProperty);
- bool IBorderElement.IsBorderColorSet() => IsSet(BorderColorProperty);
- bool IBorderElement.IsBorderWidthSet() => IsSet(BorderWidthProperty);
+ bool IBorderElement.IsCornerRadiusSet() => false;
+ bool IBorderElement.IsBackgroundColorSet() => false;
+ bool IBorderElement.IsBorderColorSet() => false;
+ bool IBorderElement.IsBorderWidthSet() => false;
[DebuggerDisplay("Image Position = {Position}, Spacing = {Spacing}")]
public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty;
- public static readonly BindableProperty CharacterSpacingProperty = TextElement.CharacterSpacingProperty;
-
public static readonly BindableProperty FontFamilyProperty = FontElement.FontFamilyProperty;
public static readonly BindableProperty FontSizeProperty = FontElement.FontSizeProperty;
set { SetValue(TextElement.TextColorProperty, value); }
}
- public double CharacterSpacing
- {
- get { return (double)GetValue(TextElement.CharacterSpacingProperty); }
- set { SetValue(TextElement.CharacterSpacingProperty, value); }
- }
+ public double CharacterSpacing { get; set; }
public FontAttributes FontAttributes
{
void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
{
- InvalidateMeasure();
}
}
public new static readonly BindableProperty TextColorProperty = InputView.TextColorProperty;
- public new static readonly BindableProperty CharacterSpacingProperty = InputView.CharacterSpacingProperty;
-
public new static readonly BindableProperty PlaceholderProperty = InputView.PlaceholderProperty;
public new static readonly BindableProperty PlaceholderColorProperty = InputView.PlaceholderColorProperty;
- public static readonly BindableProperty IsTextPredictionEnabledProperty = BindableProperty.Create(nameof(IsTextPredictionEnabled), typeof(bool), typeof(Editor), true, BindingMode.Default);
-
public static readonly BindableProperty AutoSizeProperty = BindableProperty.Create(nameof(AutoSize), typeof(EditorAutoSizeOption), typeof(Editor), defaultValue: EditorAutoSizeOption.Disabled, propertyChanged: (bindable, oldValue, newValue)
=> ((Editor)bindable)?.InvalidateMeasure());
set { SetValue(FontAttributesProperty, value); }
}
- public bool IsTextPredictionEnabled
- {
- get { return (bool)GetValue(IsTextPredictionEnabledProperty); }
- set { SetValue(IsTextPredictionEnabledProperty, value); }
- }
+ public bool IsTextPredictionEnabled { get; set; }
public string FontFamily
{
public new static readonly BindableProperty TextColorProperty = InputView.TextColorProperty;
- public new static readonly BindableProperty CharacterSpacingProperty = InputView.CharacterSpacingProperty;
-
public static readonly BindableProperty HorizontalTextAlignmentProperty = TextAlignmentElement.HorizontalTextAlignmentProperty;
public static readonly BindableProperty VerticalTextAlignmentProperty = TextAlignmentElement.VerticalTextAlignmentProperty;
[RenderWith(typeof(_FrameRenderer))]
public class Frame : ContentView, IElementConfiguration<Frame>, IPaddingElement, IBorderElement
{
- [Obsolete("OutlineColorProperty is obsolete as of version 3.0.0. Please use BorderColorProperty instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty OutlineColorProperty = BorderElement.BorderColorProperty;
-
public static readonly BindableProperty BorderColorProperty = BorderElement.BorderColorProperty;
public static readonly BindableProperty HasShadowProperty = BindableProperty.Create("HasShadow", typeof(bool), typeof(Frame), true);
set { SetValue(HasShadowProperty, value); }
}
- [Obsolete("OutlineColor is obsolete as of version 3.0.0. Please use BorderColor instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public Color OutlineColor
- {
- get { return (Color)GetValue(OutlineColorProperty); }
- set { SetValue(OutlineColorProperty, value); }
- }
-
public Color BorderColor
{
get { return (Color)GetValue(BorderElement.BorderColorProperty); }
void IBorderElement.OnBorderColorPropertyChanged(Color oldValue, Color newValue)
{
-#pragma warning disable 0618 // retain until OutlineColor removed
- OnPropertyChanged(nameof(OutlineColor));
-#pragma warning restore
}
bool IBorderElement.IsCornerRadiusSet() => IsSet(CornerRadiusProperty);
public static readonly BindableProperty IsLoadingProperty = IsLoadingPropertyKey.BindableProperty;
- internal static readonly BindablePropertyKey IsPressedPropertyKey = BindableProperty.CreateReadOnly(nameof(IsPressed), typeof(bool), typeof(ImageButton), default(bool));
-
- public static readonly BindableProperty IsPressedProperty = IsPressedPropertyKey.BindableProperty;
-
public static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty;
public event EventHandler Clicked;
public bool IsLoading => (bool)GetValue(IsLoadingProperty);
- public bool IsPressed => (bool)GetValue(IsPressedProperty);
+ public bool IsPressed => false;
public bool IsOpaque
{
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetIsLoading(bool isLoading) => SetValue(IsLoadingPropertyKey, isLoading);
- [EditorBrowsable(EditorBrowsableState.Never)]
- public void SetIsPressed(bool isPressed) =>
- SetValue(IsPressedPropertyKey, isPressed);
+ public void SetIsPressed(bool isPressed) { }
[EditorBrowsable(EditorBrowsableState.Never)]
public void SendClicked() =>
void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
{
- InvalidateMeasure();
}
}
{
public static readonly BindableProperty HorizontalTextAlignmentProperty = TextAlignmentElement.HorizontalTextAlignmentProperty;
- [Obsolete("XAlignProperty is obsolete as of version 2.0.0. Please use HorizontalTextAlignmentProperty instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty XAlignProperty = HorizontalTextAlignmentProperty;
-
public static readonly BindableProperty VerticalTextAlignmentProperty = BindableProperty.Create("VerticalTextAlignment", typeof(TextAlignment), typeof(Label), TextAlignment.Start,
propertyChanged: OnVerticalTextAlignmentPropertyChanged);
- [Obsolete("YAlignProperty is obsolete as of version 2.0.0. Please use VerticalTextAlignmentProperty instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty YAlignProperty = VerticalTextAlignmentProperty;
-
public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty;
public static readonly BindableProperty CharacterSpacingProperty = TextElement.CharacterSpacingProperty;
public static readonly BindableProperty LineHeightProperty = LineHeightElement.LineHeightProperty;
- public static readonly BindableProperty MaxLinesProperty = BindableProperty.Create(nameof(MaxLines), typeof(int), typeof(Label), -1, propertyChanged: (bindable, oldvalue, newvalue) =>
- {
- if (bindable != null)
- {
- ((Label)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
- }
- });
-
public static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty;
public static readonly BindableProperty TextTypeProperty = BindableProperty.Create(nameof(TextType), typeof(TextType), typeof(Label), TextType.Text,
set { SetValue(VerticalTextAlignmentProperty, value); }
}
- [Obsolete("XAlign is obsolete as of version 2.0.0. Please use HorizontalTextAlignment instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public TextAlignment XAlign
- {
- get { return (TextAlignment)GetValue(XAlignProperty); }
- set { SetValue(XAlignProperty, value); }
- }
-
- [Obsolete("YAlign is obsolete as of version 2.0.0. Please use VerticalTextAlignment instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public TextAlignment YAlign
- {
- get { return (TextAlignment)GetValue(YAlignProperty); }
- set { SetValue(YAlignProperty, value); }
- }
-
public FontAttributes FontAttributes
{
get { return (FontAttributes)GetValue(FontAttributesProperty); }
set { SetValue(LineHeightProperty, value); }
}
- public int MaxLines
- {
- get => (int)GetValue(MaxLinesProperty);
- set => SetValue(MaxLinesProperty, value);
- }
-
public Thickness Padding
{
get { return (Thickness)GetValue(PaddingProperty); }
void ITextAlignmentElement.OnHorizontalTextAlignmentPropertyChanged(TextAlignment oldValue, TextAlignment newValue)
{
-#pragma warning disable 0618 // retain until XAlign removed
- OnPropertyChanged(nameof(XAlign));
-#pragma warning restore
}
static void OnTextPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
static void OnVerticalTextAlignmentPropertyChanged(BindableObject bindable, object oldValue, object newValue)
{
- var label = (Label)bindable;
-#pragma warning disable 0618 // retain until YAlign removed
- label.OnPropertyChanged(nameof(YAlign));
-#pragma warning restore 0618
}
public IPlatformElementConfiguration<T, Label> On<T>() where T : IConfigPlatform
void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
{
- InvalidateMeasure();
}
-
public override IList<GestureElement> GetChildElements(Point point)
{
if (FormattedText?.Spans == null || FormattedText?.Spans.Count == 0)
public abstract class Layout : View, ILayout, ILayoutController, IPaddingElement
{
- public static readonly BindableProperty IsClippedToBoundsProperty = BindableProperty.Create("IsClippedToBounds", typeof(bool), typeof(Layout), false);
-
public static readonly BindableProperty CascadeInputTransparentProperty = BindableProperty.Create(
nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true);
InternalChildren.CollectionChanged += InternalChildrenOnCollectionChanged;
}
- public bool IsClippedToBounds
- {
- get { return (bool)GetValue(IsClippedToBoundsProperty); }
- set { SetValue(IsClippedToBoundsProperty, value); }
- }
-
public Thickness Padding
{
get { return (Thickness)GetValue(PaddingElement.PaddingProperty); }
[RenderWith(typeof(_ListViewRenderer))]
public class ListView : ItemsView<Cell>, IListViewController, IElementConfiguration<ListView>
{
- public static readonly BindableProperty IsPullToRefreshEnabledProperty = BindableProperty.Create("IsPullToRefreshEnabled", typeof(bool), typeof(ListView), false);
-
- public static readonly BindableProperty IsRefreshingProperty = BindableProperty.Create("IsRefreshing", typeof(bool), typeof(ListView), false, BindingMode.TwoWay);
-
public static readonly BindableProperty RefreshCommandProperty = BindableProperty.Create("RefreshCommand", typeof(ICommand), typeof(ListView), null, propertyChanged: OnRefreshCommandChanged);
public static readonly BindableProperty HeaderProperty = BindableProperty.Create("Header", typeof(object), typeof(ListView), null, propertyChanged: OnHeaderChanged);
public static readonly BindableProperty SeparatorVisibilityProperty = BindableProperty.Create("SeparatorVisibility", typeof(SeparatorVisibility), typeof(ListView), SeparatorVisibility.Default);
- public static readonly BindableProperty SeparatorColorProperty = BindableProperty.Create("SeparatorColor", typeof(Color), typeof(ListView), Color.Default);
-
- public static readonly BindableProperty RefreshControlColorProperty = BindableProperty.Create(nameof(RefreshControlColor), typeof(Color), typeof(ListView), Color.Default);
-
- public static readonly BindableProperty HorizontalScrollBarVisibilityProperty = BindableProperty.Create(nameof(HorizontalScrollBarVisibility), typeof(ScrollBarVisibility), typeof(ListView), ScrollBarVisibility.Default);
-
- public static readonly BindableProperty VerticalScrollBarVisibilityProperty = BindableProperty.Create(nameof(VerticalScrollBarVisibility), typeof(ScrollBarVisibility), typeof(ListView), ScrollBarVisibility.Default);
-
static readonly ToStringValueConverter _toStringValueConverter = new ToStringValueConverter();
readonly Lazy<PlatformConfigurationRegistry<ListView>> _platformConfigurationRegistry;
set { SetValue(IsGroupingEnabledProperty, value); }
}
- public bool IsPullToRefreshEnabled
- {
- get { return (bool)GetValue(IsPullToRefreshEnabledProperty); }
- set { SetValue(IsPullToRefreshEnabledProperty, value); }
- }
-
- public bool IsRefreshing
- {
- get { return (bool)GetValue(IsRefreshingProperty); }
- set { SetValue(IsRefreshingProperty, value); }
- }
-
public ICommand RefreshCommand
{
get { return (ICommand)GetValue(RefreshCommandProperty); }
set { SetValue(SelectionModeProperty, value); }
}
- public Color SeparatorColor
- {
- get { return (Color)GetValue(SeparatorColorProperty); }
- set { SetValue(SeparatorColorProperty, value); }
- }
-
- public Color RefreshControlColor
- {
- get { return (Color)GetValue(RefreshControlColorProperty); }
- set { SetValue(RefreshControlColorProperty, value); }
- }
-
public SeparatorVisibility SeparatorVisibility
{
get { return (SeparatorVisibility)GetValue(SeparatorVisibilityProperty); }
set { SetValue(SeparatorVisibilityProperty, value); }
}
- public ScrollBarVisibility HorizontalScrollBarVisibility
- {
- get { return (ScrollBarVisibility)GetValue(HorizontalScrollBarVisibilityProperty); }
- set { SetValue(HorizontalScrollBarVisibilityProperty, value); }
- }
- public ScrollBarVisibility VerticalScrollBarVisibility
- {
- get { return (ScrollBarVisibility)GetValue(VerticalScrollBarVisibilityProperty); }
- set { SetValue(VerticalScrollBarVisibilityProperty, value); }
- }
-
public ListViewCachingStrategy CachingStrategy { get; private set; }
[EditorBrowsable(EditorBrowsableState.Never)]
if (!RefreshAllowed)
return;
- SetValueCore(IsRefreshingProperty, true);
OnRefreshing(EventArgs.Empty);
ICommand command = RefreshCommand;
public void EndRefresh()
{
- SetValueCore(IsRefreshingProperty, false);
}
public event EventHandler<ItemVisibilityEventArgs> ItemAppearing;
public static readonly BindableProperty HasBackButtonProperty = BindableProperty.CreateAttached("HasBackButton", typeof(bool), typeof(NavigationPage), true);
- [Obsolete("TintProperty is obsolete as of version 1.2.0. Please use BarBackgroundColorProperty and BarTextColorProperty to change NavigationPage bar color properties.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty TintProperty = BindableProperty.Create("Tint", typeof(Color), typeof(NavigationPage), Color.Default);
-
public static readonly BindableProperty BarBackgroundColorProperty = BarElement.BarBackgroundColorProperty;
public static readonly BindableProperty BarTextColorProperty = BarElement.BarTextColorProperty;
- public static readonly BindableProperty TitleIconImageSourceProperty = BindableProperty.CreateAttached("TitleIconImageSource", typeof(ImageSource), typeof(NavigationPage), default(ImageSource));
-
- [Obsolete("TitleIconProperty is obsolete as of 4.0.0. Please use TitleIconImageSourceProperty instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty TitleIconProperty = TitleIconImageSourceProperty;
-
public static readonly BindableProperty TitleViewProperty = BindableProperty.CreateAttached("TitleView", typeof(View), typeof(NavigationPage), null, propertyChanging: TitleViewPropertyChanging);
static readonly BindablePropertyKey CurrentPagePropertyKey = BindableProperty.CreateReadOnly("CurrentPage", typeof(Page), typeof(NavigationPage), null);
set => SetValue(BarElement.BarTextColorProperty, value);
}
- [Obsolete("Tint is obsolete as of version 1.2.0. Please use BarBackgroundColor and BarTextColor to change NavigationPage bar color properties.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public Color Tint
- {
- get { return (Color)GetValue(TintProperty); }
- set { SetValue(TintProperty, value); }
- }
-
internal Task CurrentNavigationTask { get; set; }
[EditorBrowsable(EditorBrowsableState.Never)]
return (bool)page.GetValue(HasNavigationBarProperty);
}
- [Obsolete("GetTitleIcon is obsolete as of 4.0.0. Please use GetTitleIconImageSource instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static FileImageSource GetTitleIcon(BindableObject bindable)
- {
- return bindable.GetValue(TitleIconImageSourceProperty) as FileImageSource;
- }
-
- public static ImageSource GetTitleIconImageSource(BindableObject bindable)
- {
- return (ImageSource)bindable.GetValue(TitleIconImageSourceProperty);
- }
-
public static View GetTitleView(BindableObject bindable)
{
return (View)bindable.GetValue(TitleViewProperty);
page.SetValue(HasNavigationBarProperty, value);
}
- [Obsolete("SetTitleIcon is obsolete as of 4.0.0. Please use SetTitleIconImageSource instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static void SetTitleIcon(BindableObject bindable, FileImageSource value)
- {
- bindable.SetValue(TitleIconImageSourceProperty, value);
- }
-
- public static void SetTitleIconImageSource(BindableObject bindable, ImageSource value)
- {
- bindable.SetValue(TitleIconImageSourceProperty, value);
- }
-
public static void SetTitleView(BindableObject bindable, View value)
{
bindable.SetValue(TitleViewProperty, value);
{
public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty;
- public static readonly BindableProperty CharacterSpacingProperty = TextElement.CharacterSpacingProperty;
-
public static readonly BindableProperty TitleProperty =
BindableProperty.Create(nameof(Title), typeof(string), typeof(Picker), default(string));
void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
{
- InvalidateMeasure();
}
}
[assembly: StyleProperty("background-image", typeof(Page), nameof(Page.BackgroundImageSourceProperty))]
[assembly: StyleProperty("border-color", typeof(IBorderElement), nameof(BorderElement.BorderColorProperty))]
[assembly: StyleProperty("border-radius", typeof(ICornerElement), nameof(CornerElement.CornerRadiusProperty))]
-[assembly: StyleProperty("border-radius", typeof(Button), nameof(Button.CornerRadiusProperty))]
[assembly: StyleProperty("border-radius", typeof(Frame), nameof(Frame.CornerRadiusProperty))]
[assembly: StyleProperty("border-radius", typeof(ImageButton), nameof(BorderElement.CornerRadiusProperty))]
[assembly: StyleProperty("border-width", typeof(IBorderElement), nameof(BorderElement.BorderWidthProperty))]
[assembly: StyleProperty("margin-top", typeof(View), nameof(View.MarginTopProperty))]
[assembly: StyleProperty("margin-right", typeof(View), nameof(View.MarginRightProperty))]
[assembly: StyleProperty("margin-bottom", typeof(View), nameof(View.MarginBottomProperty))]
-[assembly: StyleProperty("max-lines", typeof(Label), nameof(Label.MaxLinesProperty))]
[assembly: StyleProperty("min-height", typeof(VisualElement), nameof(VisualElement.MinimumHeightRequestProperty))]
[assembly: StyleProperty("min-width", typeof(VisualElement), nameof(VisualElement.MinimumWidthRequestProperty))]
[assembly: StyleProperty("opacity", typeof(VisualElement), nameof(VisualElement.OpacityProperty))]
[assembly: StyleProperty("-xf-orientation", typeof(StackLayout), nameof(StackLayout.OrientationProperty))]
[assembly: StyleProperty("-xf-visual", typeof(VisualElement), nameof(VisualElement.VisualProperty))]
[assembly: StyleProperty("-xf-vertical-text-alignment", typeof(Label), nameof(TextAlignmentElement.VerticalTextAlignmentProperty))]
-[assembly: StyleProperty("-xf-thumb-color", typeof(Switch), nameof(Switch.ThumbColorProperty))]
//shell
[assembly: StyleProperty("-xf-flyout-background", typeof(Shell), nameof(Shell.FlyoutBackgroundColorProperty))]
public RefreshView()
{
- IsClippedToBounds = true;
VerticalOptions = LayoutOptions.FillAndExpand;
HorizontalOptions = LayoutOptions.FillAndExpand;
public new static readonly BindableProperty TextColorProperty = InputView.TextColorProperty;
- public new static readonly BindableProperty CharacterSpacingProperty = InputView.CharacterSpacingProperty;
-
readonly Lazy<PlatformConfigurationRegistry<SearchBar>> _platformConfigurationRegistry;
public Color CancelButtonColor
public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(Slider), Color.Default);
- public static readonly BindableProperty ThumbImageSourceProperty = BindableProperty.Create(nameof(ThumbImageSource), typeof(ImageSource), typeof(Slider), default(ImageSource));
-
- [Obsolete("ThumbImageProperty is obsolete as of 4.0.0. Please use ThumbImageSourceProperty instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ThumbImageProperty = ThumbImageSourceProperty;
-
public static readonly BindableProperty DragStartedCommandProperty = BindableProperty.Create(nameof(DragStartedCommand), typeof(ICommand), typeof(Slider), default(ICommand));
public static readonly BindableProperty DragCompletedCommandProperty = BindableProperty.Create(nameof(DragCompletedCommand), typeof(ICommand), typeof(Slider), default(ICommand));
set { SetValue(ThumbColorProperty, value); }
}
- public ImageSource ThumbImageSource
- {
- get { return (ImageSource)GetValue(ThumbImageSourceProperty); }
- set { SetValue(ThumbImageSourceProperty, value); }
- }
-
- [Obsolete("ThumbImage is obsolete as of 4.0.0. Please use ThumbImageSource instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public FileImageSource ThumbImage
- {
- get { return GetValue(ThumbImageProperty) as FileImageSource; }
- set { SetValue(ThumbImageProperty, value); }
- }
-
public ICommand DragStartedCommand
{
get { return (ICommand)GetValue(DragStartedCommandProperty); }
public static readonly BindableProperty OnColorProperty = BindableProperty.Create(nameof(OnColor), typeof(Color), typeof(Switch), Color.Default);
- public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(Switch), Color.Default);
-
public Color OnColor
{
get { return (Color)GetValue(OnColorProperty); }
set { SetValue(OnColorProperty, value); }
}
- public Color ThumbColor
- {
- get { return (Color)GetValue(ThumbColorProperty); }
- set { SetValue(ThumbColorProperty, value); }
- }
-
readonly Lazy<PlatformConfigurationRegistry<Switch>> _platformConfigurationRegistry;
public Switch()
public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty;
- public static readonly BindableProperty CharacterSpacingProperty = TextElement.CharacterSpacingProperty;
-
public static readonly BindableProperty TimeProperty = BindableProperty.Create(nameof(Time), typeof(TimeSpan), typeof(TimePicker), new TimeSpan(0), BindingMode.TwoWay, (bindable, value) =>
{
var time = (TimeSpan)value;
set { SetValue(TextElement.TextColorProperty, value); }
}
- public double CharacterSpacing
- {
- get { return (double)GetValue(TextElement.CharacterSpacingProperty); }
- set { SetValue(TextElement.CharacterSpacingProperty, value); }
- }
+ public double CharacterSpacing { get; set; }
public TimeSpan Time
{
void ITextElement.OnCharacterSpacingPropertyChanged(double oldValue, double newValue)
{
- InvalidateMeasure();
}
}
typeof(Layout),
typeof(Span),
typeof(TapGestureRecognizer),
- typeof(PropertyCondition)
+ typeof(PropertyCondition),
+ typeof(RefreshView),
+ typeof(StructuredItemsView),
+ typeof(SearchHandler),
};
foreach (var type in types)
RegisterPropertyHandler(Button.FontAttributesProperty, UpdateFontAttributes);
RegisterPropertyHandler(Button.TextColorProperty, UpdateTextColor);
RegisterPropertyHandler(Button.ImageSourceProperty, UpdateBitmap);
- RegisterPropertyHandler(Button.BorderColorProperty, UpdateBorder);
- RegisterPropertyHandler(Button.CornerRadiusProperty, UpdateBorder);
- RegisterPropertyHandler(Button.BorderWidthProperty, UpdateBorder);
}
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
}
}
}
-
- void UpdateBorder()
- {
- /* The simpler way is to create some specialized theme for button in
- * tizen-theme
- */
- // TODO: implement border handling
- }
}
}