Measure Override Issue

5 posts, 1 answers
  1. Vinicius
    Vinicius avatar
    9 posts
    Member since:
    Dec 2011

    Posted 30 Oct 2012 Link to this post

    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()
  2. Answer
    James
    James avatar
    4 posts
    Member since:
    Jul 2012

    Posted 26 Nov 2012 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 29 Nov 2012 Link to this post

    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.
  5. HowieD
    HowieD avatar
    8 posts
    Member since:
    Jun 2012

    Posted 20 Feb 2013 Link to this post

    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
  6. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 25 Feb 2013 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready