Click here to Skip to main content
12,063,452 members (73,949 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Silverlight
when i create Gantt Chart in silverlight 4.0

through this code in MAIN.XAML:

xmlns:gantt="clr-namespace:CoderForRent.Silverlight.Charting.Gantt;assembly=CoderForRent.Silverlight.Charting"

I have added this namespace then, I wrote

<gantt:GanttChart x:Name="gantt">
                </gantt:GanttChart>

I got this error...

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 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, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)


pls help to create Gantt Chart in my project.....
Posted 18-Apr-11 4:18am
Edited 18-Apr-11 4:43am
v3
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

We can only guess at a solution because you haven't really given us anything to go on. Do you get this in the designer, or in the compiled and running application. If you get it in the designer, try removing the DesiredWidth property from the UserControl's xaml. BTW, I found this by googling this text:

"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."
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Try setting the width and height of the control and run your code again.
If that does not work, try setting your alignments to auto - you might need to play around with those settings.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160204.4 | Last Updated 25 Apr 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100