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); }
[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); }
public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state) { throw null; }