ThresholdSlider CreateThresholdSlider(string type)
        {
            ThresholdSlider slider = new ThresholdSlider();

            slider.Type = type;
            return(slider);
        }
        void CreateThresholdSliders()
        {
            // Remove and recreate threshold sliders.
            ThresholdSliderContainer.Children.Clear();
            foreach (string sliderName in ThresholdSettings.thresholdSliderNames)
            {
                if (!IsThresholdSliderShown(sliderName))
                {
                    continue;
                }

                ThresholdSlider slider = CreateThresholdSlider(sliderName);
                DockPanel.SetDock(slider, Dock.Top);
                slider.Margin = new Thickness(0, 8, 0, 0);
                ThresholdSliderContainer.Children.Add(slider);
            }

            ThresholdSettings.SyncSliderThresholds();
        }
예제 #3
0
        private static void RefreshAdvancedModeEnabledCallback(DependencyObject target, DependencyPropertyChangedEventArgs args)
        {
            ThresholdSlider self = target as ThresholdSlider;

            self.RefreshVisibility();
        }