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(); }
private static void OnGlyphChanged(BindableObject bindable, object oldValue, object newValue) { GlyphButton glyphButton = (GlyphButton)bindable; glyphButton.OnPropertyChanged("GlyphText"); }
private static void DisabledLabelColourChanged(BindableObject bindable, object oldValue, object newValue) { GlyphButton glyphButton = (GlyphButton)bindable; glyphButton.OnPropertyChanged("LabelColour"); }