Beispiel #1
0
        public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state)
        {
            if (!IsSupported)
            {
                throw new InvalidOperationException();
            }

            VisualStyleRenderer vsr;

            switch (state)
            {
            case ScrollBarSizeBoxState.LeftAlign:
            default:
                vsr = new VisualStyleRenderer(VisualStyleElement.ScrollBar.SizeBox.LeftAlign);
                break;

            case ScrollBarSizeBoxState.RightAlign:
                vsr = new VisualStyleRenderer(VisualStyleElement.ScrollBar.SizeBox.RightAlign);
                break;
            }

            vsr.DrawBackground(g, bounds);
        }
		public static void DrawSizeBox (Graphics g, Rectangle bounds, ScrollBarSizeBoxState state)
		{
			if (!IsSupported)
				throw new InvalidOperationException ();

			VisualStyleRenderer vsr;

			switch (state) {
				case ScrollBarSizeBoxState.LeftAlign:
				default:
					vsr = new VisualStyleRenderer (VisualStyleElement.ScrollBar.SizeBox.LeftAlign);
					break;
				case ScrollBarSizeBoxState.RightAlign:
					vsr = new VisualStyleRenderer (VisualStyleElement.ScrollBar.SizeBox.RightAlign);
					break;
			}

			vsr.DrawBackground (g, bounds);
		}
Beispiel #3
0
        [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] // Using Graphics instead of IDeviceContext intentionally
        public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state)
        {
            InitializeRenderer(VisualStyleElement.ScrollBar.SizeBox.LeftAlign, (int)state);

            visualStyleRenderer.DrawBackground(g, bounds);
        }
Beispiel #4
0
       [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] // Using Graphics instead of IDeviceContext intentionally
       public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state) {
           InitializeRenderer(VisualStyleElement.ScrollBar.SizeBox.LeftAlign, (int)state);

           visualStyleRenderer.DrawBackground(g, bounds);
       }
Beispiel #5
0
 public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state)
 {
     throw null;
 }