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

Silverlight RadTabControl change tab exception

1 Answer 33 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
vlad vlad
Top achievements
Rank 1
vlad vlad asked on 27 Apr 2010, 12:35 PM
Hi,

I have a problem with RadTabControl. I have a TabControl inside a RadDocking control and I have

VerticalContentAlignment

 

="Stretch" HorizontalContentAlignment="Stretch"

 

properties for TabControl. The TabControlItems are built programmatically. All is put inside a RadWindow.
When I first open the window everything goes well, but when I Close() the Window and try to open it again  I receive an exception when I call UpdateLayout() method for the window.
Value does not fall within the expected range.
     at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
   at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
   at System.Windows.UIElement.UpdateLayout()
   at DMSInterface.Views.ManageBOLayoutControl.ManageBOLayoutWindow_IsEnabledChanged(Object sender, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyPropertyChangedEventHandler.Invoke(Object sender, DependencyPropertyChangedEventArgs e)
   at System.Windows.Controls.Control.OnIsEnabledChanged(Control control, EventArgs args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
Do you have an idea to solve this?

Thank you,
Vlad

1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 30 Apr 2010, 09:55 AM
Hi vlad,

This exception normally appears when a control that is added to the visual tree twice. This normally happens when controls are reused.

Is it possible that you creating a new window but some of its contents are the contents of the window that has been closed?

We are not aware of a problem of the RadTabControl with this behavior.

Can you help us reproduce this?
A sample project or your xaml / c# code for creating the tab will be helpful.

Greetings,
Miroslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TabControl
Asked by
vlad vlad
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or