Error :The parameter value must be greater than zero

Gauge for WPF Forum

Posted 15 years ago by LaurentB - Intersystems
Version: 4.5.0480
Platform: .NET 3.5
Environment: Windows XP (32-bit)
Avatar
I got an error when I resize a usercontrol I made with gauge :

<UserControl x:Class="ConfigFile.UCClock" x:Name="ucClock"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:gauge="http://schemas.actiprosoftware.com/winfx/xaml/gauge"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
Height="171" Width="175" IsVisibleChanged="ucClock_IsVisibleChanged">
<Grid>
<gauge:CircularGauge BackgroundRadiusRatio="1" Name="gauge" Radius="96%" Background="LightGoldenrodYellow" RimBrush="WhiteSmoke"
FrameType="CircularTopGradient" >
<gauge:CircularGauge.Scales>
<gauge:CircularScale Radius="95%" StartAngle="270" SweepAngle="360"
Background="{shared:LinearGradientBrush Gray, White, GradientType=TopToBottom, AdditionalStopCount=1}" BorderBrush="Black" BorderWidth="1">
<gauge:CircularScale.TickSets >
<gauge:CircularTickSet Minimum="0" Maximum="12" MajorInterval="1" MinorInterval="0.2">
<gauge:CircularTickSet.Ticks>
<gauge:CircularTickMarkMinor Background="Black" TickMarkType="Rectangle" TickMarkExtent="7%"
TickMarkAscent="1%" ScalePlacement="Inside" ScaleOffset="2%" />
<gauge:CircularTickMarkMajor Background="Black" TickMarkType="Rectangle" TickMarkExtent="8%"
TickMarkAscent="2%" ScalePlacement="Inside" ScaleOffset="2%" />
<gauge:CircularTickLabelMajor Foreground="Black" FontSize="16%" ScalePlacement="Inside"
ScaleOffset="12%" SkipValues="0" />
</gauge:CircularTickSet.Ticks>
<gauge:CircularTickSet.Pointers>
<gauge:CircularPointerNeedle PointerExtent="75%" PointerAscent="8%" HasDropShadow="True"
NeedleType="PivotTriangleSharp" Background="Black"
Value="{Binding ElementName=ucClock, Path=CurrentHour}" DampeningMaximumDuration="0" />
<gauge:CircularPointerNeedle PointerExtent="100%" PointerAscent="10%" HasDropShadow="True"
NeedleType="PivotTriangleSharp" Background="Black"
Value="{Binding ElementName=ucClock, Path=CurrentMinute}" DampeningMaximumDuration="0" />
<gauge:CircularPointerNeedle PointerExtent="100%" PointerAscent="5%" HasDropShadow="True"
NeedleType="PivotTriangleSharp" Background="DarkRed"
Value="{Binding ElementName=ucClock, Path=CurrentSecond}" DampeningMaximumDuration="0" />
</gauge:CircularTickSet.Pointers>
</gauge:CircularTickSet>
</gauge:CircularScale.TickSets>
</gauge:CircularScale>
</gauge:CircularGauge.Scales>
</gauge:CircularGauge>
</Grid>
</UserControl>

Thanks
The parameter value must be greater than zero.
Parameter name: emSize
at System.Windows.Media.FormattedText.ValidateFontSize(Double emSize)
at System.Windows.Media.FormattedText..ctor(String textToFormat, CultureInfo culture, FlowDirection flowDirection, Typeface typeface, Double emSize, Brush foreground, NumberSubstitution numberSubstitution)
at System.Windows.Media.FormattedText..ctor(String textToFormat, CultureInfo culture, FlowDirection flowDirection, Typeface typeface, Double emSize, Brush foreground)
at ActiproSoftware.Windows.Controls.Gauge.Primitives.CircularTickLabelBase.OnRender(DrawingContext drawingContext)
at System.Windows.UIElement.Arrange(Rect finalRect)
at ActiproSoftware.Windows.Controls.Gauge.CircularTickSet.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at ActiproSoftware.Windows.Controls.Gauge.CircularScale.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at ActiproSoftware.Windows.Controls.Gauge.CircularGauge.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

Comments (2)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
This issue has been fixed and is available in version 4.5.0485.


Actipro Software Support

Posted 15 years ago by LaurentB - Intersystems
Avatar
Many thanks !
The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.