diff --git a/components/RangeSelector/src/RangeSelector.Input.Drag.cs b/components/RangeSelector/src/RangeSelector.Input.Drag.cs index 6112fabc..e8a8fd6a 100644 --- a/components/RangeSelector/src/RangeSelector.Input.Drag.cs +++ b/components/RangeSelector/src/RangeSelector.Input.Drag.cs @@ -77,7 +77,7 @@ private double DragThumb(Thumb? thumb, double min, double max, double nextPos) Canvas.SetLeft(thumb, nextPos); - if (_toolTipText != null && _toolTip != null && thumb != null) + if (_toolTip != null && thumb != null) { var thumbCenter = nextPos + (thumb.Width / 2); _toolTip.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); @@ -99,7 +99,7 @@ private void Thumb_DragStarted(Thumb thumb) Canvas.SetZIndex(otherThumb, 0); _oldValue = RangeStart; - if (_toolTipText != null && _toolTip != null) + if (_toolTip != null) { _toolTip.Visibility = Visibility.Visible; var thumbCenter = _absolutePosition + (thumb.Width / 2); @@ -107,7 +107,8 @@ private void Thumb_DragStarted(Thumb thumb) var ttWidth = _toolTip.ActualWidth / 2; Canvas.SetLeft(_toolTip, thumbCenter - ttWidth); - UpdateToolTipText(this, _toolTipText, useMin ? RangeStart : RangeEnd); + if (_toolTipText != null) + UpdateToolTipText(this, _toolTipText, useMin ? RangeStart : RangeEnd); } VisualStateManager.GoToState(this, useMin ? MinPressedState : MaxPressedState, true);