private void Initialize() { ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); ButtonFrame = new Frame() { BackgroundColor = Color.Transparent, HasShadow = false, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, Padding = 0, CornerRadius = 0 }; ButtonBehide = new SupportButton() { BackgroundColor = Color.Transparent, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, Command = ClickedCommand }; ButtonTitleLabel = new Label(); ButtonImage = new Image(); Children.Add(ButtonFrame, 0, 1, 0, 1); Children.Add(ButtonBehide, 0, 1, 0, 1); }
private void ScanUIButtonsDisable() { ProfileButton.SetActive(false); SupportButton.SetActive(false); AboutUsButton.SetActive(false); SignoutButton.SetActive(false); CloseButton.SetActive(false); }
private void ScanUIButtonsEnable() { ProfileButton.SetActive(true); SupportButton.SetActive(true); AboutUsButton.SetActive(true); SignoutButton.SetActive(true); CloseButton.SetActive(true); }
void ReleaseDesignerOutlets() { if (SupportButton != null) { SupportButton.Dispose(); SupportButton = null; } if (SwitchCelcius != null) { SwitchCelcius.Dispose(); SwitchCelcius = null; } }
protected override void OnElementChanged(ElementChangedEventArgs <Button> e) { base.OnElementChanged(e); if (e.NewElement != null) { if (Element is SupportButton) { supportButton = Element as SupportButton; Control.ClipsToBounds = true; Control.Layer.CornerRadius = supportButton.CornerRadius; } } }
protected override void OnElementChanged(ElementChangedEventArgs <Button> e) { base.OnElementChanged(e); if (e.NewElement != null) { if (Element is SupportButton) { supportButton = Element as SupportButton; if (Control != null) { Control.SetAllCaps(false); Control.SetPadding(0, 0, 0, 0); Control.TextAlignment = Android.Views.TextAlignment.Center; } } } }
public override void ViewDidLoad() { base.ViewDidLoad(); SwitchCelcius.On = false; SupportButton.SetTitle("Code", UIControlState.Normal); }