Skip to main content
All docs
V26.1
  • AreaSeriesBase.PictureFillOptions Property

    Gets or sets options that define how pictures fill area shapes.

    Namespace: DevExpress.Docs.Office

    Assembly: DevExpress.Docs.Core.v26.1.dll

    Declaration

    public PictureFillOptions PictureFillOptions { get; set; }

    Property Value

    Type Description
    PictureFillOptions

    A PictureFillOptions object that specifies picture fill behavior.

    Remarks

    The following code snippet applies a picture fill to an area series in a chart:

    using DevExpress.Docs.Office;
    using DevExpress.Docs.Presentation;
    using DevExpress.Drawing;
    
    namespace PresentationApiSample;
    
    public class Program {
        public static async Task Main(string[] _) {
            // Create a presentation and add a blank slide.
            Presentation presentation = new Presentation();
            presentation.Slides.Clear();
            Slide slide = new Slide(SlideLayoutType.Blank);
            presentation.Slides.Add(slide);
    
            // Insert a chart that fills the slide.
            Chart chart = new Chart();
            chart.Width = presentation.SlideSize.Width;
            chart.Height = presentation.SlideSize.Height;
            slide.Shapes.Add(chart);
    
            // Add the first area series.
            AreaSeries series1 = new AreaSeries();
            series1.Arguments = new ChartStringData(new[] { "Q1", "Q2", "Q3" });
            series1.Values = new ChartNumericData(new double[] { 12, 18, 15 });
            chart.Series.Add(series1);
    
            // Load image from file and create the picture fill.
            string imagePath = "D:\\image.png";
            Stream stream = new FileStream(imagePath, FileMode.Open, FileAccess.Read);
            PictureFill fill = new PictureFill(DXImage.FromStream(stream));
            fill.Stretch = true;
    
            // Apply the picture fill to the series.
            series1.Properties = new ChartElement { Fill = fill };
        }
    }
    
    See Also