Declined
Last Updated: 02 Apr 2020 15:07 by ADMIN
Aleksandar
Created on: 25 Feb 2020 22:25
Category: ToolBar
Type: Bug Report
0
Specified element is already the logical child of another element. Disconnect it first.

This is the most logged exception in my application and it looks like it's coming from RadToolBar: Specified element is already the logical child of another element. Disconnect it first.

Stacktrace:

System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent):50
System.Windows.FrameworkElement.AddLogicalChild(Object child):55
System.Windows.Controls.UIElementCollection.AddInternal(UIElement element):7
System.Windows.Controls.UIElementCollection.Add(UIElement element)
Telerik.Windows.Controls.RadToolBar.InsertInPanel(Panel panel, UIElement container, Int32 position):3
Telerik.Windows.Controls.RadToolBar.OnItemsCollectionChanged(Panel panel, NotifyCollectionChangedEventArgs e):136
Telerik.Windows.Controls.RadToolBar.OnOverflowItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e):15
System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item):36
System.Collections.ObjectModel.Collection`1.Add(T item):32
System.Collections.ObjectModel.Collection`1.System.Collections.IList.Add(Object value):28
Telerik.Windows.Controls.RadToolBar.InsertOverflowItem(Object item, Int32 position):45
Telerik.Windows.Controls.RadToolBar.TryMoveStripItemToOverflow(Int32 index)
Telerik.Windows.Controls.RadToolBar.MeasureOverride(Size availableSize):70
System.Windows.FrameworkElement.MeasureCore(Size availableSize):568
System.Windows.UIElement.Measure(Size availableSize):401
System.Windows.Controls.Grid.MeasureOverride(Size constraint):67
System.Windows.FrameworkElement.MeasureCore(Size availableSize):568
System.Windows.UIElement.Measure(Size availableSize):401
System.Windows.Controls.Border.MeasureOverride(Size constraint):256
System.Windows.FrameworkElement.MeasureCore(Size availableSize):568
System.Windows.UIElement.Measure(Size availableSize):401
MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint):28
3 comments
ADMIN
Yoan
Posted on: 06 Mar 2020 08:54

Hello Aleks,

Thank you for the update.

I am glad that you managed to resolve the issue.

Regards,
Yoan
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Aleksandar
Posted on: 04 Mar 2020 18:47

Hi Yoan,

 

I think the issue is with the old XAML template I was using. I copied the latest RadToolbar XAML from the Themes folder and it seemed to resolve the issue. Thanks!

 

Regards,

Aleks

ADMIN
Yoan
Posted on: 03 Mar 2020 09:02

Hi Aleksandar,

I am afraid that with the supplied information I can not figure out what is going on. We are not aware of such an exception in RadToolBar. It would be great if you can isolate the issue in a sample project. Then you can send it to me for further investigation. 

Regards,
Yoan
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.