From 65700939cde81028419ffb8b733df4e6905ad0f8 Mon Sep 17 00:00:00 2001 From: Tsung Xu <920114525@qq.com> Date: Fri, 9 Nov 2018 22:55:02 -0800 Subject: [PATCH] Minor bugfix in data binding. --- src/Axes/Axis.cs | 6 +++--- src/Axes/AxisGrid.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Axes/Axis.cs b/src/Axes/Axis.cs index a0cfd2d..3000af2 100644 --- a/src/Axes/Axis.cs +++ b/src/Axes/Axis.cs @@ -200,16 +200,16 @@ public DataTransform DataTransform /// The default foreground is black [Category("Appearance")] [Description("Brush for labels and ticks")] - public SolidColorBrush Foreground + public Brush Foreground { - get { return (SolidColorBrush)GetValue(ForegroundProperty); } + get { return (Brush)GetValue(ForegroundProperty); } set { SetValue(ForegroundProperty, value); } } /// /// Identifies the dependency property. /// public static readonly DependencyProperty ForegroundProperty = - DependencyProperty.Register("Foreground", typeof(SolidColorBrush), typeof(Axis), new PropertyMetadata(new SolidColorBrush(Colors.Black))); + DependencyProperty.Register("Foreground", typeof(Brush), typeof(Axis), new PropertyMetadata(new SolidColorBrush(Colors.Black))); /// /// Gets or sets the maximum possible count of ticks. diff --git a/src/Axes/AxisGrid.cs b/src/Axes/AxisGrid.cs index 3b83d13..86fc7c2 100644 --- a/src/Axes/AxisGrid.cs +++ b/src/Axes/AxisGrid.cs @@ -52,7 +52,7 @@ public class AxisGrid : PlotBase /// Identifies the dependency property /// public static readonly DependencyProperty StrokeProperty = - DependencyProperty.Register("Stroke", typeof(SolidColorBrush), typeof(AxisGrid), new PropertyMetadata(new SolidColorBrush(Colors.LightGray), + DependencyProperty.Register("Stroke", typeof(Brush), typeof(AxisGrid), new PropertyMetadata(new SolidColorBrush(Colors.LightGray), (o, e) => { AxisGrid axisGrid = (AxisGrid)o; @@ -120,9 +120,9 @@ public bool IsYAxisReversed /// Gets or sets the Brush that specifies how the horizontal and vertical lines is painted /// [Category("Appearance")] - public SolidColorBrush Stroke + public Brush Stroke { - get { return (SolidColorBrush)GetValue(StrokeProperty); } + get { return (Brush)GetValue(StrokeProperty); } set { SetValue(StrokeProperty, value); } }