예제 #1
0
 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);
 }
예제 #2
0
 private void ScanUIButtonsDisable()
 {
     ProfileButton.SetActive(false);
     SupportButton.SetActive(false);
     AboutUsButton.SetActive(false);
     SignoutButton.SetActive(false);
     CloseButton.SetActive(false);
 }
예제 #3
0
 private void ScanUIButtonsEnable()
 {
     ProfileButton.SetActive(true);
     SupportButton.SetActive(true);
     AboutUsButton.SetActive(true);
     SignoutButton.SetActive(true);
     CloseButton.SetActive(true);
 }
예제 #4
0
        void ReleaseDesignerOutlets()
        {
            if (SupportButton != null)
            {
                SupportButton.Dispose();
                SupportButton = null;
            }

            if (SwitchCelcius != null)
            {
                SwitchCelcius.Dispose();
                SwitchCelcius = null;
            }
        }
예제 #5
0
        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;
                }
            }
        }
예제 #6
0
 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);
 }