SIL.FieldWorks.SharpViews.AssembledStyles.WithFirstLineIndent C# (CSharp) Method

WithFirstLineIndent() public method

public WithFirstLineIndent ( int mp ) : AssembledStyles
mp int
return AssembledStyles
		public AssembledStyles WithFirstLineIndent(int mp)
		{
			return m_styleCache.GetDerivedStyle(this, (int)FwTextPropType.ktptFirstIndent, mp,
												(newStyles, w) => newStyles.m_firstLineIndent = mp);
		}

Usage Example

Example #1
0
		private void InitFixedRowBoxes()
		{
			var stylesheet = SetupStyles();
			var styles = new AssembledStyles(stylesheet);
			RootBox root = new RootBoxFdo(styles.WithFirstLineIndent(10000));

			var item1 = ApplyTsStringStyle("This begins row one", "Normal", 1);
			var item2 = ApplyTsStringStyle("This is Box 2", "Normal", 1);
			var item3 = ApplyTsStringStyle("This is Box 3", "Normal", 1);
			var item4 = ApplyTsStringStyle("This ends row one", "Normal", 1);

			root.Builder.Show(
				Row.WithWidths(new FixedColumnWidths(300, 60, 60, 100)).Containing(
					Cell.Containing(Paragraph.Containing(Display.Of(() => item1.TsContents)).Style(item1.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.Pink).Border(1000),
					Cell.Containing(Paragraph.Containing(Display.Of(() => item2.TsContents)).Style(item2.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.Orange).Border(1000),
					Cell.Containing(Paragraph.Containing(Display.Of(() => item3.TsContents)).Style(item3.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.LightGray).Border(1000),
					Cell.Containing(Paragraph.Containing(Display.Of(() => item4.TsContents)).Style(item4.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.FloralWhite).Border(1000)).Margins(5000, 5000, 5000, 5000).Borders(1000, 1000, 1000, 1000, Color.Black));
			root.Builder.Show(
				Row.WithWidths(new FixedColumnWidths(300, 60, 60, 100)).WithWrap.Containing(
					Cell.Containing(Paragraph.Containing(Display.Of(() => item1.TsContents)).Style(item1.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.Pink).Border(1000),
					Cell.Containing(Paragraph.Containing(Display.Of(() => item2.TsContents)).Style(item2.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.Orange).Border(1000),
					Cell.Containing(Paragraph.Containing(Display.Of(() => item3.TsContents)).Style(item3.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.LightGray).Border(1000),
					Cell.Containing(Paragraph.Containing(Display.Of(() => item4.TsContents)).Style(item4.ParaStyle)).Pads(2000, 2000, 2000, 2000).Margins(2000, 2000, 2000, 2000)
						.BackColor(Color.FloralWhite).Border(1000)).Margins(5000, 5000, 5000, 5000).Borders(1000, 1000, 1000, 1000, Color.Black));

			styleChooser.Visible = true;
			theSharpView.Root = root;
			theSharpView.Focus();
		}