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

Measure Override Issue

4 Answers 301 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Vinicius
Top achievements
Rank 1
Vinicius asked on 30 Oct 2012, 09:16 PM
Hi,
I made a simple form using Telerik v2012.2.912.20(Trial) with a PropertyGridView and a TreeView. The behavior is simple: my TreeView shows a list of objects, when I select a node this object's properties are loaded on PropertyGridView (by SelectedObject property). It was working fine until I upgraded to the newest version of Telerik v.2012.3.1017.20, now my form is throwing an exception on ShowDialog() method and PropertyGridView don't works anymore (the TreeView behavior aparently still fine).

That's what I got on form's ShowDialog() exception:

System.InvalidOperationException was unhandled
  Message=MeasureOverride returned positive infinity: Telerik.WinControls.UI.PropertyGridGroupTextElement
  Source=Telerik.WinControls
  StackTrace:
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.StackLayoutElement.MeasureElement(RadElement element, SizeF& availableSize, SizeF& desiredSize, Int32 spacing)
       at Telerik.WinControls.UI.StackLayoutElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.LightVisualElement.MeasureElements(SizeF availableSize, SizeF clientSize, Padding borderThickness)
       at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.VirtualizedStackContainer`1.MeasureElementCore(RadElement element, SizeF availableSize)
       at Telerik.WinControls.UI.VirtualizedStackContainer`1.MeasureElement(IVirtualizedElement`1 element)
       at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureElements()
       at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.ScrollViewElement`1.MeasureViewElement(SizeF availableSize)
       at Telerik.WinControls.UI.ScrollViewElement`1.MeasureView(SizeF availableSize)
       at Telerik.WinControls.UI.ScrollViewElement`1.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.VirtualizedScrollPanel`2.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.PropertyGridTableElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.PropertyGridSplitElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.StackLayoutElement.MeasureElement(RadElement element, SizeF& availableSize, SizeF& desiredSize, Int32 spacing)
       at Telerik.WinControls.UI.StackLayoutElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.PropertyGridElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RootRadElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RootRadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RadElementTree.PerformInnerLayout(Boolean performMeasure, Int32 x, Int32 y, Int32 width, Int32 height)
       at Telerik.WinControls.RadControl.OnLoad(Size desiredSize)
       at Telerik.WinControls.UI.RadPropertyGrid.OnLoad(Size desiredSize)
       at Telerik.WinControls.RadControl.LoadElementTree(Size desiredSize)
       at Telerik.WinControls.RadControl.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at Telerik.WinControls.UI.RadFormControlBase.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at System.Windows.Forms.Form.ShowDialog()
       at M4.M4v2.Chart.CtlPainelChart.tmrSelectIndicator_Tick(Object sender, EventArgs e) in C:\Users\Vinicius\Desktop\Plena\M4 C# DDF\M4v2\Chart\CtlPainelChart.cs:line 6755
       at System.Windows.Forms.Timer.OnTick(EventArgs e)
       at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at M4.Program.Main(String[] args) in C:\Users\Vinicius\Desktop\Plena\M4 C# DDF\Program.cs:line 52
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

4 Answers, 1 is accepted

Sort by
0
Accepted
James
Top achievements
Rank 1
answered on 27 Nov 2012, 12:02 AM
Vin,

I saw something simular in the backstage control.  Here is the fix for it...

This exception can be thrown if for some reason you have set the AutoSize property of the backstage control to true. The RadRibbonBarBackstageView control is not designed to work as an AutoSize control since it is always sized to fit the form. Please check your designer/source files for such setting and remove it.
James
0
Ivan Petrov
Telerik team
answered on 29 Nov 2012, 05:28 PM
Hello guys,

Thank you both for writing.

James, thank you for sharing your insight with the community.

Vinicius, if James's solution helped you, please, remember to mark his post as answer so others can find this information quickly. If it did not help, please open a support ticket and attach your project so we can reproduce the issue and find a solution for it.

Looking forward to your reply.
 
Greetings,
Ivan Petrov
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
HowieD
Top achievements
Rank 1
answered on 20 Feb 2013, 06:14 PM
Hi,
we get also a null reference exception while creating custom TreeNodeElements.
The implementation is similar like the code in your samples Browser.
Our Version ist 12.3.1212.40.

Please provide a workaround as soon as possible.

Kind Regards,
HowieD
0
Ivan Petrov
Telerik team
answered on 25 Feb 2013, 07:58 AM
Hi HowieD,

Thank you for writing.

The information you have provided is insufficient for me to be able to help you. I would kindly ask you to open a support ticket and attach your project or a sample where you reproduce the issue so we can investigate any problems. Please, mention this forum thread in your ticket so we can update it once we have a solution.

Looking forward to your ticket.

Greetings,
Ivan Petrov
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
PropertyGrid
Asked by
Vinicius
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Ivan Petrov
Telerik team
HowieD
Top achievements
Rank 1
Share this question
or