public RangeSlider()
 {
     this.InitializeComponent();
     _max = 1.0;
     _min = 0.0;
     _normalisationFactor = 0.0;
     args = new ValueChangedEventArgs();
 }
        private void rangeSlider_UpperValueChangedEvent(object sender, ValueChangedEventArgs e)
        {
            bool filter = false;
            resetRangeSlidersButton.IsEnabled = true;

            for (int i = 0; i < _polylines.Count; i++)
            {
                double[] rowValues = _polylines[i].DataValues;

                for (int j = 0; j < rowValues.Length; j++)
                {
                    if (rowValues[j] > _rangeSliders[j].UpperValue ||
                            rowValues[j] < _rangeSliders[j].LowerValue)
                    {
                        // value is outside range so filter
                        filter = true;
                    }
                }

                _polylines[i].Filtered = filter;

                // reset filter for the next row
                filter = false;
            }
        }
 public void OnLowerValueChanged(ValueChangedEventArgs args)
 {
     if (LowerValueChangedEvent != null)
     {
         LowerValueChangedEvent(this, args);
     }
 }
 // Custom events for when the upper/lower values are changed
 // Check if the events are subscribed to before firing
 public void OnUpperValueChanged(ValueChangedEventArgs args)
 {
     if (UpperValueChangedEvent != null)
     {
         UpperValueChangedEvent(this, args);
     }
 }