コード例 #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);
            }
        }