LiveCharts.Wpf.Separator.AsCoreElement C# (CSharp) Method

AsCoreElement() public method

Ases the core element.
public AsCoreElement ( AxisCore axis, AxisOrientation source ) : SeparatorConfigurationCore
axis AxisCore The axis.
source AxisOrientation The source.
return SeparatorConfigurationCore
        public SeparatorConfigurationCore AsCoreElement(AxisCore axis, AxisOrientation source)
        {
            AxisOrientation = source;
            return new SeparatorConfigurationCore(axis)
            {
                IsEnabled = IsEnabled,
                Step = Step,
                Source = source
            };
        }

Usage Example

Example #1
0
 /// <summary>
 /// AsCoreElement
 /// </summary>
 /// <param name="chart"></param>
 /// <param name="source"></param>
 /// <returns></returns>
 public override AxisCore AsCoreElement(ChartCore chart, AxisOrientation source)
 {
     if (Model == null)
     {
         Model = new WindowAxisCore(this);
     }
     Model.ShowLabels                = ShowLabels;
     Model.Chart                     = chart;
     Model.IsMerged                  = IsMerged;
     Model.Labels                    = Labels;
     Model.LabelFormatter            = LabelFormatter;
     Model.MaxValue                  = MaxValue;
     Model.MinValue                  = MinValue;
     Model.Title                     = Title;
     Model.Position                  = Position;
     Model.Separator                 = Separator.AsCoreElement(Model, source);
     Model.DisableAnimations         = DisableAnimations;
     Model.Sections                  = Sections.Select(x => x.AsCoreElement(Model, source)).ToList();
     ((WindowAxisCore)Model).Windows = Windows.ToList();
     return(Model);
 }