using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace RealTimeGraphX.WPF.DataSeries
{
public class WpfDataSeries : GraphObject, IGraphDataSeries
{
#region Internal Properties
///
/// Gets the GDI stroke color.
///
public System.Drawing.Color GdiStroke { get; private set; }
///
/// Gets the GDI fill brush.
///
public System.Drawing.Brush GdiFill { get; private set; }
#endregion
public string Name { get; set; }
public double StrokeThickness { get; set; }
public bool IsVisible { get; set; }
private Color _stroke;
///
/// Gets or sets the series stroke color.
///
public Color Stroke
{
get { return _stroke; }
set
{
_stroke = value;
RaisePropertyChangedAuto();
if (_stroke != null)
{
GdiStroke = _stroke.ToGdiColor();
}
else
{
GdiStroke = System.Drawing.Color.Transparent;
}
}
}
private Brush _fill;
///
/// Gets or sets the series fill brush.
///
public Brush Fill
{
get { return _fill; }
set
{
_fill = value;
RaisePropertyChangedAuto();
if (_fill != null)
{
GdiFill = _fill.ToGdiBrush();
}
else
{
GdiFill = null;
}
}
}
public WpfDataSeries()
{
StrokeThickness = 1;
}
}
}