diff options
Diffstat (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs')
| -rw-r--r-- | Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs index a2060d10e..c5eaaf4af 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs @@ -169,6 +169,8 @@ namespace RealTimeGraphEx control.MinMaxChanged?.Invoke(control, new EventArgs()); })); + + /// <summary> /// Gets or sets the graph refresh rate in milliseconds (default 30, affects performance). /// </summary> @@ -375,6 +377,18 @@ namespace RealTimeGraphEx public static readonly DependencyProperty MaxPointsProperty = DependencyProperty.Register("MaxPoints", typeof(int), typeof(RealTimeGraphExBase), new PropertyMetadata(1000, new PropertyChangedCallback(CrossModelChanged))); + + /// <summary> + /// Gets or sets a value indicating whether [use automatic range]. + /// </summary> + public bool UseAutoRange + { + get { return (bool)GetValue(UseAutoRangeProperty); } + set { SetValue(UseAutoRangeProperty, value); } + } + public static readonly DependencyProperty UseAutoRangeProperty = + DependencyProperty.Register("UseAutoRange", typeof(bool), typeof(RealTimeGraphExBase), new PropertyMetadata(false, new PropertyChangedCallback(CrossModelChanged))); + #endregion #region Cross Thread Fields @@ -392,6 +406,7 @@ namespace RealTimeGraphEx protected bool _antialiased; protected bool _isPaused; protected bool _disableRendering; + protected bool _useAutoRange; #endregion #region Constructors @@ -696,6 +711,7 @@ namespace RealTimeGraphEx virtualMaximum = Maximum; virtualStart = 0; virtualEnd = gridMain.ActualWidth; + _useAutoRange = UseAutoRange; RenderOptions.SetEdgeMode(this, _antialiased ? EdgeMode.Unspecified : EdgeMode.Aliased); }, DispatcherPriority.Send); |
