Table of Contents
  • Getting Started
  • EO.Pdf
  • EO.Web
  • EO.WebBrowser
  • EO.Wpf
  • Common Topics
  • Reference
    • .NET API Reference
      • EO.Base
      • EO.Base.UI
      • EO.Extensions
      • EO.Pdf
      • EO.Pdf.Acm
        • EO.Pdf.Acm
        • Classes
          • AcmBlock Class
          • AcmBold Class
          • AcmBorder Class
          • AcmCheckBox Class
          • AcmColumn Class
          • AcmComboBox Class
          • AcmContent Class
          • AcmContentCollection Class
          • AcmField Class
          • AcmImage Class
          • AcmInlineBlock Class
          • AcmItalic Class
          • AcmLineBreak Class
          • AcmLineInfo Class
          • AcmLink Class
          • AcmListBox Class
          • AcmListField Class
          • AcmPadding Class
          • AcmPageBreak Class
          • AcmPageEventArgs Class
          • AcmPageLayout Class
          • AcmParagraph Class
          • AcmRadioButton Class
          • AcmRender Class
          • AcmStyle Class
          • AcmStyleSheet Class
          • AcmTable Class
          • AcmTableCell Class
          • AcmTableCellCollection Class
          • AcmTableColumn Class
          • AcmTableColumnCollection Class
          • AcmTableRow Class
          • AcmTableRowCollection Class
          • AcmText Class
          • AcmTextBox Class
          • AcmUnit Class
        • Enumerations
        • Delegates
      • EO.Pdf.Contents
      • EO.Pdf.Drawing
      • EO.Pdf.Mvc
      • EO.Web
      • EO.WebBrowser
      • EO.WebBrowser.DOM
      • EO.WebEngine
      • EO.WinForm
      • EO.Wpf
      • EO.Wpf.Gauge
      • EO.Wpf.Gauge.Shapes
      • EO.Wpf.Primitives
      • EO.Wpf.Themes.Aero
      • EO.Wpf.Themes.Classic
      • EO.Wpf.Themes.Luna
      • EO.Wpf.Themes.Metro
      • EO.Wpf.Themes.Royale
    • JavaScript API Reference
AcmContent.SetProperty Method 

Sets a property value.

Syntax
 public AcmContent SetProperty(
   string propName,
   object value
);

Parameters

propName

The name of the property.

propName can be a single name, for example, "Tag"; or multiple names separated by ".", for example, "Style.BackgroundColor". The first case is functionally equivalent to

//This line is the same as content.SetProperty("Tag", value);
content.Tag = value;
The second case is functionally equivalent to
//This line is the same as content.SetProperty("Style.BackgroundColor", value);
content.Style.BackgroundColor = value;

value
The value of the property.

Return Value

Returns this AcmContent itself.

Remarks

Because this method returns the content object itself, it allows you to initialize a complex content tree with a single statement. For example:

//Setting both background color and foreground color in
//a single statement
new AcmText("some text")
    .SetProperty("Style.BackgroundColor", Color.Red)
    .SetProperty("Style.ForegroundColor", Color.Blue);
See Also