How to size the DigitalGauge

Gauge for WPF Forum

Posted 11 years ago by Crile Carvey
Version: 4.5.0484
Avatar
Hello,

There is something odd about sizing the DigitalGauge.

1. The Height and Width seem to be critical - I would have thought omitting them would work, but if I do, nothing at all gets displayed.

2. Height and Width only change the characters, not the enclosing box.

3. LayoutTransform yields weird results. See below - why doesn't it just scale the whole gauge?

Can you explain?

Crile

<gauge:DigitalGauge x:Name="gauge" Height="100" Width="200" HorizontalAlignment="Left" CharacterPadding="15" CharacterSpacing="10" SkewAngleX="-7" DimmedBrush="#282828" CharacterCount="4" Background="#303030" IsBackgroundEffectEnabled="False" CharacterType="Segment7Normal" Foreground="#D20000" Value = "00:00">
    <gauge:DigitalGauge.LayoutTransform>
        <ScaleTransform ScaleX="0.9" ScaleY="0.9" />
    </gauge:DigitalGauge.LayoutTransform>
</gauge:DigitalGauge>

Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Crile,

1. The gauge controls are currently unable to determine the minimize size need to display their content. Therefore, an explicit Width/Height must be specified. You only need to specify the Width/Height directly on the gauge control when used in a container that would otherwise give unlimited size (e.g. StackPanel, ScrollViewer).

2&3. I'm not seeing any issue with setting the Width/Height with your code snippet. When adjust these properties (or using a LayoutTransform), the gauge is properly sized (this includes the frame and the digital characters). If you can send a complete sample project that reproduces the issue to our support address, I can take a look.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.