Beispiel #1
0
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Slider instance using the specified template
        /// </summary>
        /// <param name="template"></param>
        public Slider(SliderTemplate template)
            : base(template)
        {
            MinimumValue = template.MinimumValue;
            MaximumValue = template.MaximumValue;

            Label = template.Label;
            if (Label == null)
            {
                Label = "";
            }

            CurrentValue = template.StartingValue;
            if (CurrentValue < MinimumValue || CurrentValue > MaximumValue)
            {
                CurrentValue = MinimumValue;
            }

            HasFrame = true;
            CanHaveKeyboardFocus = false;
            HilightWhenMouseOver = false;

            BarPigment = template.BarPigment;
        }
Beispiel #2
0
        // /////////////////////////////////////////////////////////////////////////////////
        #endregion
        #region Constructors
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Slider instance using the specified template
        /// </summary>
        /// <param name="template"></param>
        public Slider(SliderTemplate template)
            : base(template)
        {
            MinimumValue = template.MinimumValue;
            MaximumValue = template.MaximumValue;

            Label = template.Label;
            if (Label == null)
            {
                Label = "";
            }

            CurrentValue = template.StartingValue;
            if (CurrentValue < MinimumValue || CurrentValue > MaximumValue)
            {
                CurrentValue = MinimumValue;
            }

            HasFrame             = true;
            CanHaveKeyboardFocus = false;
            HilightWhenMouseOver = false;

            BarPigment = template.BarPigment;
        }