void initLabels()
        {
            titleLabel = new UILabel(new CGRect(32, 0, 270, 200));
            titleLabel.LineBreakMode = UILineBreakMode.WordWrap;
            titleLabel.TextColor     = titleColor;
            titleLabel.Font          = UIFont.FromName(fontName, 24);

            Add(titleLabel);

            titleLabel.Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit";
            var titleHeight = ReaderConstants.ResizeHeigthWithText(titleLabel, maxHeight: 960f);


            contentLabel = new UILabel(new CGRect(32, titleHeight + separation, 270, 200));
            contentLabel.LineBreakMode = UILineBreakMode.WordWrap;
            contentLabel.TextColor     = contentColor;
            contentLabel.Font          = UIFont.FromName(fontName, 16);
            Add(contentLabel);

            contentLabel.Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. quis nostrud exercitation END";
            var contentHeight = ReaderConstants.ResizeHeigthWithText(contentLabel, maxHeight: 960f);

            slideHeight = titleHeight + contentHeight + separation + 10;
            var frame = new CGRect(0, slidePos, 320, slideHeight + 10);

            Frame = frame;
        }
 void initResizableText()
 {
     contentLabel = new UILabel(new CGRect(20, 20, 280, 100));
     contentLabel.LineBreakMode = UILineBreakMode.WordWrap;
     contentLabel.TextColor     = UIColor.Gray;
     contentLabel.Font          = UIFont.FromName(ReaderConstants.FontName, 16);
     contentLabel.Text          = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. quis nostrud exercitation END";
     contentHeight = ReaderConstants.ResizeHeigthWithText(contentLabel, maxHeight: 960f);
     slideHeight   = contentHeight + 40;
 }
示例#3
0
        void initLabel()
        {
            textLabel = new UILabel(new CGRect(32, topHeight, 270, 200));
            textLabel.LineBreakMode = UILineBreakMode.WordWrap;
            textLabel.TextColor     = UIColor.Gray;
            textLabel.Font          = UIFont.FromName(fontName, 16);
            Add(textLabel);

            textLabel.Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. quis nostrud exercitation END";
            centerHeight   = ReaderConstants.ResizeHeigthWithText(textLabel, maxHeight: 960f);
        }
        void initResizableText()
        {
            titleLabel = new UILabel(new CGRect(20, 20, 250, 20));
            titleLabel.LineBreakMode = UILineBreakMode.WordWrap;
            titleLabel.TextColor     = UIColor.Purple;
            titleLabel.Font          = UIFont.FromName(ReaderConstants.FontName, 22);
            titleLabel.Text          = "Aves Tipicas";
            titleHeight = ReaderConstants.ResizeHeigthWithText(titleLabel, maxHeight: 960f);

            contentLabel = new UILabel(new CGRect(20, 20 + titleHeight + 16, 250, 200));
            contentLabel.LineBreakMode = UILineBreakMode.WordWrap;
            contentLabel.TextColor     = UIColor.Gray;
            contentLabel.Font          = UIFont.FromName(ReaderConstants.FontName, 16);
            contentLabel.Text          = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. quis nostrud exercitation END";
            contentHeight = ReaderConstants.ResizeHeigthWithText(contentLabel, maxHeight: 960f);

            borderHeight = titleHeight + contentHeight + 56;
        }
示例#5
0
        void initResizableText()
        {
            titleLabel = new UILabel(new CGRect(20, 20, 250, 20));
            titleLabel.LineBreakMode = UILineBreakMode.WordWrap;
            titleLabel.TextColor     = UIColor.Purple;
            titleLabel.Font          = UIFont.FromName(ReaderConstants.FontName, 22);
            titleLabel.Text          = "Aves Tipicas";
            titleHeight = ReaderConstants.ResizeHeigthWithText(titleLabel, maxHeight: 960f);

            nfloat epositon = 54;

            for (int i = 0; i < 4; i++)
            {
                ItemizeElement el = new ItemizeElement(epositon + contentHeight);
                contentHeight = el.GetPosition();
                elements.Add(el);
            }

            borderHeight = epositon + contentHeight + separation;
        }
示例#6
0
        void initElement()
        {
            circleView = new UIView(new CGRect(0, 4, 8, 8))
            {
                BackgroundColor = BackColor
            };
            circleView.Layer.CornerRadius  = 4;
            circleView.Layer.MasksToBounds = true;
            Add(circleView);

            textLabel = new UILabel(new CGRect(18, 0, textWidth, 10));
            textLabel.LineBreakMode = UILineBreakMode.WordWrap;
            textLabel.TextColor     = UIColor.Gray;
            textLabel.Font          = UIFont.FromName(ReaderConstants.FontName, 16);
            textLabel.Text          = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. End";
            textHeight = ReaderConstants.ResizeHeigthWithText(textLabel, maxHeight: 960f);
            Add(textLabel);

            var frame = new CGRect(22, position, 250, textHeight);

            Frame = frame;
        }