protected override void OnControlDefaultSizeChanged(RadPropertyChangedEventArgs e)
        {
            RadControl control1 = this.ElementTree.Control as RadControl;

            if (control1 == null || control1.AutoSize)
            {
                return;
            }
            control1.GetControlDefaultSize();
            Size         newValue = (Size)e.NewValue;
            RadScrollBar control2 = this.ElementTree.Control as RadScrollBar;

            if (control2 == null)
            {
                return;
            }
            if (control2.ScrollType == ScrollType.Vertical)
            {
                if (control1.Size.Width >= newValue.Width)
                {
                    return;
                }
                control1.Width = newValue.Width;
            }
            else
            {
                if (control1.Size.Height >= newValue.Height)
                {
                    return;
                }
                control1.Height = newValue.Height;
            }
        }
예제 #2
0
        private bool IsValueInRange(RadScrollBar scrollBar, int value)
        {
            if (value <= scrollBar.Maximum && value >= scrollBar.Minimum)
            {
                return(true);
            }

            return(false);
        }
예제 #3
0
 private void SynchronizeScrollbarCore(
     int value,
     RadScrollBar scrollbar,
     ScrollState scrollbarState,
     ScrollProperties scrollProperties)
 {
     if (!this.IsValueInRange(scrollbar, value))
     {
         return;
     }
     this.synchronizing    = true;
     scrollbar.Minimum     = scrollProperties.Minimum;
     scrollbar.Maximum     = scrollProperties.Maximum;
     scrollbar.SmallChange = scrollProperties.SmallChange;
     scrollbar.Value       = value;
     scrollbar.LargeChange = scrollProperties.Visible || scrollbarState != ScrollState.AlwaysShow ? scrollProperties.LargeChange : scrollProperties.Maximum;
     this.synchronizing    = false;
 }
예제 #4
0
 public RadScrollBarAccessibleObject(RadScrollBar owner, string name)
     : base((Control)owner, name)
 {
     this.ownerControl = owner;
 }
예제 #5
0
 public RadScrollBarAccessibleObject(RadScrollBar owner) : base(owner)
 {
 }