Ejemplo n.º 1
0
        private static void OnModeChanged(BindableObject bindable, object oldValue, object newValue)
        {
            GlyphButton glyphButton = (GlyphButton)bindable;
            ButtonMode  newMode     = (ButtonMode)newValue;

            switch (newMode)
            {
            case ButtonMode.GlyphOnly:
            {
                glyphButton.GlyphIconLabel.HorizontalTextAlignment = TextAlignment.Center;
                glyphButton.GlyphIconLabel.VerticalTextAlignment   = TextAlignment.Center;

                break;
            }

            case ButtonMode.GlyphAndTextLeftRight:
            {
                glyphButton.GlyphIconLabel.HorizontalTextAlignment = TextAlignment.Center;
                glyphButton.GlyphIconLabel.VerticalTextAlignment   = TextAlignment.Center;
                glyphButton.GlyphTextLabel.HorizontalTextAlignment = TextAlignment.End;
                glyphButton.GlyphTextLabel.VerticalTextAlignment   = TextAlignment.Center;

                break;
            }

            case ButtonMode.TextOnly:
            {
                glyphButton.GlyphTextLabel.HorizontalTextAlignment = TextAlignment.Center;
                glyphButton.GlyphTextLabel.VerticalTextAlignment   = TextAlignment.Center;
                break;
            }
            }
            glyphButton.OnPropertyChanged("TextLabelIsVisible");
            glyphButton.OnPropertyChanged("IconLabelIsVisible");
            glyphButton.UpdateChildrenLayout();
        }
Ejemplo n.º 2
0
        private static void OnGlyphChanged(BindableObject bindable, object oldValue, object newValue)
        {
            GlyphButton glyphButton = (GlyphButton)bindable;

            glyphButton.OnPropertyChanged("GlyphText");
        }
Ejemplo n.º 3
0
        private static void DisabledLabelColourChanged(BindableObject bindable, object oldValue, object newValue)
        {
            GlyphButton glyphButton = (GlyphButton)bindable;

            glyphButton.OnPropertyChanged("LabelColour");
        }