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

invalid visual DependencyObject

2 Answers 120 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Terry Newton
Top achievements
Rank 1
Terry Newton asked on 27 Jan 2010, 06:22 PM

I am getting a stack dump out of my app (which has not changed in weeks and was working) with the following info:

Reference is not a valid visual DependencyObject.

   at System.Windows.Media.VisualTreeHelper.GetRelative(DependencyObject reference, RelativeKind relativeKind)
   at System.Windows.Media.VisualTreeHelper.GetChildrenCount(DependencyObject reference)
   at Telerik.Windows.Controls.DependencyObjectExtensions.<FindChildrenByType>d__0`1.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at Telerik.Windows.Controls.DependencyObjectExtensions.FindChildByType[T](DependencyObject source)
   at Telerik.Windows.Controls.SchedulerPresenterExtensions.TryFindResource(SchedulerPresenter presenter, String name)
   at Telerik.Windows.Controls.SchedulerAnimation.BeginViewTransitionAnimation(ViewTransitionMode mode)
   at Telerik.Windows.Controls.RadScheduler.OnViewModeChanged()
   at Telerik.Windows.Controls.RadScheduler.OnViewModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadScheduler.set_ViewMode(SchedulerViewMode value)
   at rwCalendar.rwCalendar.CalendarMode_ChangedHandler()
   at rwCalendar.rwCalendar.Calendar_ButtonClick(Object sender, RoutedEventArgs e)
   at rwCalendar.rwCalendar.DayButton_Click(Object sender, RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

The only thing I can identify that may have impacted tis (in both my developement and production environments) is that last week we tried to upgrade to the latest version of your controls and had to revert to the older version because rather than fixing a problem that you had reported fixed it mad all our grids with embedded combo box columns through an exception and perhaps we did not back out cleanly.

I have attached a listing of the telerik components in my apps bin directory for my Dev environment for the app. 

I would appreciate any pointers about how to investigate this error.

Thanks much for any possible help.

Terry

 

2 Answers, 1 is accepted

Sort by
0
Terry Newton
Top achievements
Rank 1
answered on 31 Jan 2010, 02:23 AM
No thoughts, anyone?  This is happening when the calendar mode is being set to

Telerik.Windows.Controls.SchedulerViewMode.Week

or a similar value.  This was working previously, but it is not clear to me all the factors that influence the dependency object for calendar mode..
0
Rosi
Telerik team
answered on 01 Feb 2010, 04:29 PM
Hello Terry Newton,

Could you please send us sample running project to test it locally? This will help us to investigate the problem and provide you with a solution.

Kind regards,
Rosi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Calendar
Asked by
Terry Newton
Top achievements
Rank 1
Answers by
Terry Newton
Top achievements
Rank 1
Rosi
Telerik team
Share this question
or