aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs')
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
index f0c612608..a2060d10e 100644
--- a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
@@ -71,6 +71,11 @@ namespace RealTimeGraphEx
/// </summary>
public new event MouseEventHandler MouseLeave;
+ /// <summary>
+ /// Occurs when [minimum maximum changed].
+ /// </summary>
+ public event EventHandler MinMaxChanged;
+
#endregion
#region Protected Fields
@@ -141,7 +146,12 @@ namespace RealTimeGraphEx
set { SetValue(MaximumProperty, value); }
}
public static readonly DependencyProperty MaximumProperty =
- DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(255.0, new PropertyChangedCallback(CrossModelChanged)));
+ DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(255.0, (d, e) =>
+ {
+ var control = d as RealTimeGraphExBase;
+ CrossModelChanged(d, e);
+ control.MinMaxChanged?.Invoke(control, new EventArgs());
+ }));
/// <summary>
/// Gets or sets the minimum expected value to be plotted on the graph (default 0).
@@ -152,7 +162,12 @@ namespace RealTimeGraphEx
set { SetValue(MinimumProperty, value); }
}
public static readonly DependencyProperty MinimumProperty =
- DependencyProperty.Register("Minimum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(0.0, new PropertyChangedCallback(CrossModelChanged)));
+ DependencyProperty.Register("Minimum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(0.0, (d, e) =>
+ {
+ var control = d as RealTimeGraphExBase;
+ CrossModelChanged(d, e);
+ control.MinMaxChanged?.Invoke(control, new EventArgs());
+ }));
/// <summary>
/// Gets or sets the graph refresh rate in milliseconds (default 30, affects performance).