Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

XML
<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
Updated 18-Apr-11 3:43am
v3

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."
 
Share this answer
 
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900