Skip to main content
All docs
V25.1
  • DiagramPageSettings.Color Property

    Specifies the diagram page color.

    Namespace: DevExpress.Web.ASPxDiagram

    Assembly: DevExpress.Web.ASPxDiagram.v25.1.dll

    NuGet Package: DevExpress.Web

    Declaration

    public Color Color { get; set; }

    Property Value

    Type Description
    Color

    A structure that specifies the page color.

    Property Paths

    You can access this nested property as listed below:

    Library Object Type Path to Color
    ASP.NET MVC Extensions DiagramSettings
    .SettingsPage .Color
    ASP.NET Web Forms Controls ASPxDiagram
    .SettingsPage .Color

    Remarks

    Use the Color property to specify the diagram page color.

    <dx:ASPxDiagram ID="Diagram" runat="server" Units="Cm" >
        <SettingsPage Width="21" Height="29.7" Color="#ccffcc" Orientation="Landscape" />
    </dx:ASPxDiagram>
    

    Since page settings are stored in a diagram model, the ASPxDiagram behaves as follows.

    • If you call the server Import(String) or client Import(data) method, the method applies the imported page settings and the Color property is ignored.
    • If a diagram is read-only (the ReadOnly property is set to true), it is not possible to use the Color property to define the background color. In this instance, use CSS styles to specify the page background color.

      .my-diagram .dxdi-canvas .page {
        fill: gray;
      }
      
      <dx:ASPxDiagram ID="Diagram" CssClass="my-diagram" runat="server" ReadOnly="true">
      </dx:ASPxDiagram>
      
    See Also