ComponentOne Gauges for WinForms
Working with Gauges for WinForms / Gauge Positioning and Arrangement
In This Topic
    Gauge Positioning and Arrangement
    In This Topic

    The origin of the coordinate system is at the top-left corner of the C1Gauge control. It is possible to align multiple gauges in the same container control. Gauges can be overlapped or placed side-by-side. The fine-turning settings give an ability to maintain the aspect ratio and relative position of individual gauges when resizing the container control.

    The C1GaugeViewport class lies in the core of these abilities.

    The following elements have the Viewport property: C1Gauge, C1GaugeBase, and C1GaugeBaseShape. They are related as parent-child-grandchild. So the client area of the container control becomes the basis for C1Gauge viewport. Viewport for an individual gauge is based on the owner C1Gauge viewport. Viewport for gauge shapes is count from the owner gauge's viewport.

    Now let's consider how we can get the working area for a given element having its viewport settings and the owner element's working area.

    The following is list of the C1GaugeViewport object properties in the same order as they are applied:

    The next image shows a viewport that has all pixel-based properties set to positive values, except the Width which is equal to 0 (other properties have their default values):


    Viewport

    Next sample shows a viewport where the MarginX, X, and Y properties are negative and Height is equal to 0.


    Viewport
    See Also