Пример #1
0
        private static void OnButtonWidthRequestChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.labelText.WidthRequest = (double)newValue;
            }
        }
Пример #2
0
        private static void OnCommandChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.ClickCommand = (ICommand)newValue;
            }
        }
Пример #3
0
        private static void OnButtonCornerRadiusChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.frame.CornerRadius = (float)newValue;
            }
        }
Пример #4
0
        private static void OnButtonIconFamilyChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.labelIcon.FontFamily = (string)newValue;
            }
        }
Пример #5
0
        private static void OnTextColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.labelText.TextColor = (Color)newValue;
            }
        }
Пример #6
0
        private static void OnButtonLineBreakModeChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.labelText.LineBreakMode = (LineBreakMode)newValue;
            }
        }
Пример #7
0
        private static void OnButtonMarginChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.frame.Margin = (Thickness)newValue;
            }
        }
Пример #8
0
        private static void OnButtonBackgroundChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.framebase.BackgroundColor = (Color)newValue;
            }
        }
Пример #9
0
        private static void OnButtonAttributesChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.labelText.FontAttributes = (FontAttributes)newValue;
                thisctrl.labelIcon.FontAttributes = (FontAttributes)newValue;
            }
        }
Пример #10
0
        private static void OnButtonTextMarginChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESILabelButton thisctrl = (ESILabelButton)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                Thickness thismargin = (Thickness)newValue;
                thisctrl.labelText.Margin = thismargin;
                thisctrl.labelIcon.Margin = new Thickness(0, 0, thismargin.Left, 0);
            }
        }