Example #1
0
 private void prepareDetailLabel()
 {
     DetailLabel = new UILabel();
     DetailLabel.ContentScaleFactor = Device.Scale;
     DetailLabel.Font          = RobotoFont.RegularWithSize(12);
     DetailLabel.TextAlignment = UITextAlignment.Left;
 }
Example #2
0
 private void prepareDetailLabel()
 {
     DetailLabel.TextAlignment      = UITextAlignment.Center;
     DetailLabel.ContentScaleFactor = Device.Scale;
     DetailLabel.Font      = RobotoFont.RegularWithSize(12);
     DetailLabel.TextColor = Color.DarkText.Secondary;
 }
Example #3
0
 private void prepareDetailLabel()
 {
     DetailLabel.Font = RobotoFont.RegularWithSize(12f);
     DetailColor      = Color.DarkText.Others;
     AddSubview(DetailLabel);
     AddObserver(this, "detailLabel.text", default(NSKeyValueObservingOptions), TextFieldContext.Handle);
 }
Example #4
0
 private void preparePlaceholderLabel()
 {
     Font = RobotoFont.RegularWithSize(16);
     PlaceholderNormalColor = Color.DarkText.Others;
     AddSubview(PlaceholderLabel);
     AddObserver(this, "placeholderLabel.text", default(NSKeyValueObservingOptions), TextFieldContext.Handle);
 }
Example #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);
 }
Example #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);
        }
Example #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);
 }