Esempio n. 1
0
 private void prepareDetailLabel()
 {
     DetailLabel = new UILabel();
     DetailLabel.ContentScaleFactor = Device.Scale;
     DetailLabel.Font          = RobotoFont.RegularWithSize(12);
     DetailLabel.TextAlignment = UITextAlignment.Left;
 }
Esempio n. 2
0
 private void prepareDetailLabel()
 {
     DetailLabel.TextAlignment      = UITextAlignment.Center;
     DetailLabel.ContentScaleFactor = Device.Scale;
     DetailLabel.Font      = RobotoFont.RegularWithSize(12);
     DetailLabel.TextColor = Color.DarkText.Secondary;
 }
Esempio n. 3
0
 private void prepareDetailLabel()
 {
     DetailLabel.Font = RobotoFont.RegularWithSize(12f);
     DetailColor      = Color.DarkText.Others;
     AddSubview(DetailLabel);
     AddObserver(this, "detailLabel.text", default(NSKeyValueObservingOptions), TextFieldContext.Handle);
 }
Esempio n. 4
0
 private void preparePlaceholderLabel()
 {
     Font = RobotoFont.RegularWithSize(16);
     PlaceholderNormalColor = Color.DarkText.Others;
     AddSubview(PlaceholderLabel);
     AddObserver(this, "placeholderLabel.text", default(NSKeyValueObservingOptions), TextFieldContext.Handle);
 }
Esempio n. 5
0
 private void prepareTitleLabel()
 {
     TitleLabel = new UILabel();
     TitleLabel.ContentScaleFactor = Device.Scale;
     TitleLabel.Font          = RobotoFont.RegularWithSize(17);
     TitleLabel.TextAlignment = UITextAlignment.Left;
     AddObserver(this, "titleLabel.textAlignment", default(NSKeyValueObservingOptions), sToolbarContext.Handle);
 }
Esempio n. 6
0
        //protected override void Dispose(bool disposing)
        //{
        //	RemoveObserver(this, "titleLabel.textAlignment", sNavigationItemContext.Handle);
        //	//base.Dispose(disposing);
        //}

        //~NavigationItem()
        //{
        //	RemoveObserver(this, "titleLabel.textAlignment");
        //}

        #endregion

        #region FUNCTIONS

        //public override void ObserveValue(NSString keyPath, NSObject ofObject, NSDictionary change, IntPtr context)
        //{
        //	if (keyPath.ToString() == "titleLabel.textAlignment")
        //	{
        //		ContentViewAlignment = TitleLabel.TextAlignment == UITextAlignment.Center ? ContentViewAlignment.Center : ContentViewAlignment.Any;
        //	}
        //	base.ObserveValue(keyPath, ofObject, change, context);
        //}

        //static NSObject sNavigationItemContext = new NSObject();

        private void prepareTitleLabel()
        {
            TitleLabel.TextAlignment      = UITextAlignment.Center;
            TitleLabel.ContentScaleFactor = Device.Scale;
            TitleLabel.Font      = RobotoFont.MediumWithSize(17);
            TitleLabel.TextColor = Color.DarkText.Primary;
            //AddObserver(this, "titleLabel.textAlignment", default(NSKeyValueObservingOptions), sNavigationItemContext.Handle);
        }
Esempio n. 7
0
 private void prepareTitleLabel()
 {
     TitleLabel.Font            = RobotoFont.RegularWithSize(14);
     TitleLabel.TextAlignment   = UITextAlignment.Center;
     TitleLabel.BackgroundColor = Color.White;
     TitleLabel.SetDepthPreset(Button.DepthPreset());
     TitleLabel.SetCornerRadiusPreset(CornerRadiusPreset.Radius1);
     AddSubview(TitleLabel);
 }