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

Clicking on RichTextBox Hyperlink with RadComboBox crashes Silverlight

1 Answer 52 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Anton Trinkunas
Top achievements
Rank 1
Anton Trinkunas asked on 28 Aug 2012, 12:53 PM
Hi

Create Silverlight application with following xaml:

<UserControl x:Class="SilverlightApplication4.MainPage"
    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/# 


1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 30 Aug 2012, 01:49 PM
Hello Anton,

We were able to reproduce the issue and we have logged it here in our Public Issue Tracking System. You can vote and track the progress of fixing it. Also your Telerik points have been updated for the report.
If you have any questions, please don't hesitate to contact us.


Greetings,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ComboBox
Asked by
Anton Trinkunas
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or