This question is locked. New answers and comments are not allowed.
Hi
Create Silverlight application with following xaml:
Scenario:
1. Click on ComboBox
2. Click on Hyperlink
Result: Silverlight crashed with exception:
{System.InvalidOperationException: Reference is not a valid visual DependencyObject.
at System.Windows.Media.VisualTreeHelper.GetRelative(DependencyObject reference, RelativeKind relativeKind)
at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
at Telerik.Windows.Controls.ParentOfTypeExtensions.GetParent(DependencyObject element)
at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext()
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value)
at Telerik.Windows.Controls.ParentOfTypeExtensions.IsAncestorOf(DependencyObject element, DependencyObject descendant)
at Telerik.Windows.Controls.RadComboBox.get_IsKeyboardFocusWithin()
at Telerik.Windows.Controls.RadComboBox.ChangeVisualState(Boolean useTransitions)
at Telerik.Windows.Controls.ItemsControl.ChangeVisualState()
at Telerik.Windows.Controls.ItemsControl.OnIsFocusedChanged(DependencyPropertyChangedEventArgs e)
at Telerik.Windows.Controls.ItemsControl.OnIsFocusedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Telerik.Windows.DependencyPropertyExtensions.SetValue(DependencyObject element, DependencyPropertyKey key, Object value)
at Telerik.Windows.Controls.ItemsControl.set_IsFocused(Boolean value)
at Telerik.Windows.Controls.ItemsControl.OnLostFocus(RoutedEventArgs e)
at System.Windows.Controls.Control.OnLostFocus(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)}
Tested on RadControls_for_Silverlight5_2012_2_0725_Trial_hotfix and Silverlight 5.0.61118.0 (x64)
Related issues:
http://www.telerik.com/community/forums/silverlight/treeview/clicking-on-richtextbox-hyperlink-with-radtreeview-throws-exception.aspx
http://connect.microsoft.com/VisualStudio/feedback/details/625402/#
Create Silverlight application with following xaml:
<
UserControl
x:Class
=
"SilverlightApplication4.MainPage"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
StackPanel
>
<
telerik:RadComboBox
></
telerik:RadComboBox
>
<
RichTextBox
IsReadOnly
=
"True"
>
<
Paragraph
>
<
Hyperlink
NavigateUri
=
"http://www.google.com"
>
Silverlight</
Hyperlink
>
</
Paragraph
>
</
RichTextBox
>
</
StackPanel
>
</
Grid
>
</
UserControl
>
Scenario:
1. Click on ComboBox
2. Click on Hyperlink
Result: Silverlight crashed with exception:
{System.InvalidOperationException: Reference is not a valid visual DependencyObject.
at System.Windows.Media.VisualTreeHelper.GetRelative(DependencyObject reference, RelativeKind relativeKind)
at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
at Telerik.Windows.Controls.ParentOfTypeExtensions.GetParent(DependencyObject element)
at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext()
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value)
at Telerik.Windows.Controls.ParentOfTypeExtensions.IsAncestorOf(DependencyObject element, DependencyObject descendant)
at Telerik.Windows.Controls.RadComboBox.get_IsKeyboardFocusWithin()
at Telerik.Windows.Controls.RadComboBox.ChangeVisualState(Boolean useTransitions)
at Telerik.Windows.Controls.ItemsControl.ChangeVisualState()
at Telerik.Windows.Controls.ItemsControl.OnIsFocusedChanged(DependencyPropertyChangedEventArgs e)
at Telerik.Windows.Controls.ItemsControl.OnIsFocusedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Telerik.Windows.DependencyPropertyExtensions.SetValue(DependencyObject element, DependencyPropertyKey key, Object value)
at Telerik.Windows.Controls.ItemsControl.set_IsFocused(Boolean value)
at Telerik.Windows.Controls.ItemsControl.OnLostFocus(RoutedEventArgs e)
at System.Windows.Controls.Control.OnLostFocus(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)}
Tested on RadControls_for_Silverlight5_2012_2_0725_Trial_hotfix and Silverlight 5.0.61118.0 (x64)
Related issues:
http://www.telerik.com/community/forums/silverlight/treeview/clicking-on-richtextbox-hyperlink-with-radtreeview-throws-exception.aspx
http://connect.microsoft.com/VisualStudio/feedback/details/625402/#