Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Gauge > Design Time Error "Value does not fall within the expected range."

Not answered Design Time Error "Value does not fall within the expected range."

Feed from this thread
  • Muthukumar avatar

    Posted on Nov 8, 2011 (permalink)

    hi team,
      i have a Rad Gauge and i have set of Customtickmarks within that. if i hardcoded the value then it show the design but if i get the same value from a propety using MVVM model, i am getting error in design time like "Value does not fall within the expected range." i have no idea what can be done. Could you guys please look into this issue?

    i have attached screenshot of that error.

    thanks
    Muthukumar Nagarajan

    <telerik:RadGauge x:Name="rdgLiquidRate"
                                       Width="200" Height="100"
                                       Tag="Nominal Pressure" >
     
     
                                   <telerik:RadialGauge
                                           Style="{StaticResource RadialGaugeHalfCircleNStyle}"
                                           Background="{x:Null}"
                                           BorderBrush="{x:Null}"
                                           OuterBackground="{x:Null}"
                                           OuterBorderBrush="{x:Null}"
                                           x:Name="RadialGauge1">
     
     
                                       <telerik:RadialScale
                                               Style="{StaticResource RadialScaleHalfCircleNStyle}"
                                               Min="0" Max="{Binding FirstGauge.Max}"
                                               LabelRotationMode="None"
                                               MajorTickStep="{Binding FirstGauge.MajorTickStep}"
                                               FontWeight="SemiBold"
                                               x:Name="QLiqRadScale">
     
     
                                           <telerik:RadialScale.Label>
                                               <telerik:LabelProperties Foreground="Transparent"
                                                       Format="{Binding FirstGauge.LableFormat}"
                                                       Location="CenterOutside" />
                                           </telerik:RadialScale.Label>
                                           <telerik:RadialScale.MajorTick>
                                               <telerik:MajorTickProperties Length="0.25" Location="Outside" Background="#FFBABABA" Offset="0.17" />
                                           </telerik:RadialScale.MajorTick>
                                           <telerik:RadialScale.MinorTick>
                                               <telerik:MinorTickProperties Length="0.10" Location="Outside" Background="#FFBABABA" Offset="0.32"/>
                                           </telerik:RadialScale.MinorTick>
                                           <telerik:RadialScale.MiddleTick>
                                               <telerik:MiddleTickProperties Length="0.10" Location="Outside" Background="#FFBABABA" Offset="0.32"/>
                                           </telerik:RadialScale.MiddleTick>
     
     
     
     
                                           <telerik:RadialRange Canvas.ZIndex="-1"
                                                           x:Name="QLiqRadialRange1"
                                                           StartWidth="1"
                                                           EndWidth="1"
                                                           Location="OverCenter"
                                                           Background="#8b250e" Max="{Binding FirstGauge.LowLow}"
                                                           Min="0"  />
     
     
                                           <telerik:RadialRange Canvas.ZIndex="-1"
                                                           x:Name="QLiqRadialRange2"
                                                           StartWidth="1"
                                                           EndWidth="1"
                                                           Location="OverCenter"
                                                           Background="#9f8821" Max="{Binding FirstGauge.Low}"
                                                           Min="{Binding FirstGauge.LowLow}" />
     
     
                                           <telerik:RadialRange Canvas.ZIndex="-1"
                                                           x:Name="QLiqRadialRange3"
                                                           StartWidth="1"
                                                           EndWidth="1"
                                                           Location="OverCenter"
                                                           Background="#64851e" Max="{Binding FirstGauge.High}"
                                                           Min="{Binding FirstGauge.Low}" />
     
     
                                           <telerik:RadialRange Canvas.ZIndex="-1"
                                                           x:Name="QLiqRadialRange4"
                                                           StartWidth="1"
                                                           EndWidth="1"
                                                           Location="OverCenter"
                                                           Background="#9f8821" Max="{Binding FirstGauge.HighHigh}"
                                                           Min="{Binding FirstGauge.High}"  />
     
     
                                           <telerik:RadialRange Canvas.ZIndex="-1"
                                                           x:Name="QLiqRadialRange5"
                                                           StartWidth="1"
                                                           EndWidth="1"
                                                           Location="OverCenter"
                                                           Background="#8b250e" Max="100"
                                                           Min="0"  />
     
     
                                           <telerik:TickList Canvas.ZIndex="1">
                                               <telerik:CustomTickMark x:Name="QLiqTick0" Background="Transparent" BorderBrush="Transparent" Location="CenterOutside" TooltipFormat="0" Value="0"></telerik:CustomTickMark>
                                               <telerik:CustomTickMark x:Name="QLiqTick1" Background="Transparent" BorderBrush="Transparent" Location="CenterOutside" TooltipFormat="0" Value="{Binding HighHigh}"></telerik:CustomTickMark>
                                               <!--<telerik:CustomTickMark x:Name="QLiqTick1" Background="Transparent" BorderBrush="Transparent" Location="CenterOutside" TooltipFormat="{Binding FirstGauge.LowLow}" Value="{Binding FirstGauge.LowLow}"></telerik:CustomTickMark>
                                               <telerik:CustomTickMark x:Name="QLiqTick2" Background="Transparent" BorderBrush="Transparent" Location="CenterOutside" TooltipFormat="{Binding FirstGauge.Low}" Value="{Binding FirstGauge.Low}"></telerik:CustomTickMark>
                                               <telerik:CustomTickMark x:Name="QLiqTick3" Background="Transparent" BorderBrush="Transparent" Location="CenterOutside" TooltipFormat="{Binding FirstGauge.High}" Value="{Binding FirstGauge.High}"></telerik:CustomTickMark>
                                               <telerik:CustomTickMark x:Name="QLiqTick4" Background="Transparent" BorderBrush="Transparent" Location="CenterOutside" TooltipFormat="{Binding FirstGauge.HighHigh}" Value="{Binding FirstGauge.HighHigh}"></telerik:CustomTickMark>
                                               <telerik:CustomTickMark x:Name="QLiqTick5" Background="Transparent" BorderBrush="Transparent" Location="CenterOutside" TooltipFormat="{Binding FirstGauge.Max}" Value="{Binding FirstGauge.Max}"></telerik:CustomTickMark>
                                               -->
                                           </telerik:TickList>
     
     
                                           <telerik:IndicatorList>
                                               <telerik:Needle
                                                       x:Name="gauge1_needle2"
                                                       Value="{Binding FirstGauge.FirstNeedleValue}"
                                                       IsAnimated="true"
                                                       ArrowBackground="Black"
                                                       ArrowBorderBrush="Black"
                                                       Height="13"
                                                       Background="{x:Null}"
                                                       BorderBrush="{x:Null}">
                                                   <telerik:Needle.Effect>
                                                       <DropShadowEffect
                                                               BlurRadius="4"
                                                               ShadowDepth="2"
                                                               Opacity="0.75" />
                                                   </telerik:Needle.Effect>
     
     
                                               </telerik:Needle>
     
     
     
     
                                           </telerik:IndicatorList>
                                       </telerik:RadialScale>
                                   </telerik:RadialGauge>
                               </telerik:RadGauge>"
    Attached files

    Reply

  • Andrey Andrey admin's avatar

    Posted on Nov 10, 2011 (permalink)

    Hi Muthukumar,

    Unfortunately there is a problem in design time with the data binding of the CustomTickMark.Value property in a XAML code. As workaround you can specify some value in XAML code and you can create the data binding within the codebehind of UserControl like the following:
    Binding binding = new Binding("LowLow");
    binding.Source = viewModel;
    this.QLiqTick1.SetBinding(CustomTickMark.ValueProperty, binding);

    Also I should note that the RadialRange elements of your XAML shouldn't be included into the RadialScale element directly. They should be placed inside the RangeList like the indicators in the IndicatorList.

    Best wishes,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Gauge > Design Time Error "Value does not fall within the expected range."
Related resources for "Design Time Error "Value does not fall within the expected range.""

Silverlight Gauge Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]