/// <summary>
 ///  Defines a style builder for <see cref="IChartView{TDrawingContext}"/> objects.
 /// </summary>
 /// <typeparam name="TDrawingContext">The type of the drawing context.</typeparam>
 /// <param name="styler">The styler.</param>
 /// <param name="predicate">The predicate.</param>
 /// <returns></returns>
 public static VisualsInitializer <TDrawingContext> ForCharts <TDrawingContext>(
     this VisualsInitializer <TDrawingContext> styler,
     Action <IChartView <TDrawingContext> > predicate)
     where TDrawingContext : DrawingContext
 {
     styler.ChartBuilder = predicate;
     return(styler);
 }
 /// <summary>
 ///  Defines a style builder for <see cref="IPieSeries{TDrawingContext}"/> objects.
 /// </summary>
 /// <typeparam name="TDrawingContext">The type of the drawing context.</typeparam>
 /// <param name="styler">The styler.</param>
 /// <param name="predicate">The predicate.</param>
 /// <returns></returns>
 public static VisualsInitializer <TDrawingContext> ForPieSeries <TDrawingContext>(
     this VisualsInitializer <TDrawingContext> styler,
     Action <IPieSeries <TDrawingContext> > predicate)
     where TDrawingContext : DrawingContext
 {
     styler.PieSeriesBuilder = predicate;
     return(styler);
 }
 /// <summary>
 ///  Defines a style builder for stacked vertical <see cref="IBarSeries{TDrawingContext}"/> objects.
 /// </summary>
 /// <typeparam name="TDrawingContext">The type of the drawing context.</typeparam>
 /// <param name="styler">The styler.</param>
 /// <param name="predicate">The predicate.</param>
 /// <returns></returns>
 public static VisualsInitializer <TDrawingContext> ForStackedColumnSeries <TDrawingContext>(
     this VisualsInitializer <TDrawingContext> styler,
     Action <IStackedBarSeries <TDrawingContext> > predicate)
     where TDrawingContext : DrawingContext
 {
     styler.StackedColumnSeriesBuilder = predicate;
     return(styler);
 }
Пример #4
0
 /// <summary>
 /// Creates a new styles builder and configures it using the given predicate.
 /// </summary>
 /// <param name="predicate">The predicate.</param>
 /// <returns>The current theme instance</returns>
 public Theme <TDrawingContext> WithVisualsInitializer(Action <VisualsInitializer <TDrawingContext> > predicate)
 {
     predicate(_theme = new VisualsInitializer <TDrawingContext>());
     return(this);
 }