This is a migrated thread and some comments may be shown as answers.

Timebar causes unhandled exception in designer

1 Answer 75 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Yue
Top achievements
Rank 1
Yue asked on 05 Dec 2011, 07:17 AM
Hi All,

When I added a RadTimebar to my work, there always comes out a Unhandled exception in designer.

I just use timebar like this:
<telerik:RadTimeBar Name="timeBar1"                                      
             PeriodStart="1-Oct-2010" PeriodEnd="1-Oct-2012"
             VisiblePeriodStart="1-Dec-2010" VisiblePeriodEnd="15-Jan-2011"
             SelectionStart="20-Dec-2010 12:03:00 AM" SelectionEnd="27-Dec-2010  12:04:00 AM"
             Margin="10,5" >
    <telerik:RadTimeBar.Intervals>                           
        <telerik:QuarterInterval/>
        <telerik:MonthInterval />
        <telerik:WeekInterval />
        <telerik:DayInterval />
    </telerik:RadTimeBar.Intervals>
</telerik:RadTimeBar>

And here is the exception:
System.Reflection.TargetInvocationException
Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
 
  
System.InvalidOperationException
Layout measurement override of element 'Microsoft.Windows.Design.Platform.SilverlightViewProducer+SilverlightContentHost' should not return PositiveInfinity as its DesiredSize, even if Infinity is passed in as available size.
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Designer.ZoomableViewPresenter.DesignerBackground.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   at Microsoft.Windows.Design.Interaction.DesignerView.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Designer.Viewport.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at MS.Internal.DeferredHwndSource.ProcessQueue(Object sender, EventArgs e)

Any idea about this?

Thanks !

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 07 Dec 2011, 02:04 PM
Hi Yue,
I cannot see any Telerik-specific code in the provided stack trace, which leads me to the idea, that you might be able to reproduce the problem without the timebar control. In case my assumption is incorrect, please open a formal support ticket and send me a simple running project, with which I can reproduce the problem locally.

Basically, the only thing that you need to check, is that in the folder, from which you have referenced the Telerik.Windows.Controls.DataVisualization.dll, there is a design folder with the following assemblies:
Telerik.Windows.Controls.DataVisualization.Design.dll, Telerik.Windows.Controls.DataVisualization.Expression.Design.dll, Telerik.Windows.Controls.DataVisualization.VisualStudio.Design.4.0.dll,
Telerik.Windows.Controls.DataVisualization.VisualStudio.Design.dll.

If you have referenced the DataVisualization.dll from the installation folder, you should not have problems with RadTimeBar in VS designer.

Best wishes,
Tsvetie
the Telerik team

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

Tags
TimeBar
Asked by
Yue
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or