Step 1. set isPinned = true;
Step 2. set isPinned = false;
Step 3. set isPinned = true;
The first few times it works... but then it crashes.. The first information below is the error.. After this, I have included the results from the VS Watch window which shows that the RadPane looks the same when it crashes as it does when it doesn't
Here is the error message...System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Value does not fall within the expected range.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value)
at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value)
at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
at System.Windows.PresentationFrameworkCollection`1.Add(T value)
at System.Windows.Controls.ItemsControl.AddVisualChild(Int32 index, DependencyObject container, Boolean needPrepareContainer)
at System.Windows.Controls.ItemsControl.AddContainerForPosition(GeneratorPosition position)
at System.Windows.Controls.ItemsControl.OnIte
msChangedHandler(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.Primitives.ItemsChangedEventHandler.Invoke(Object sender, ItemsChangedEventArgs e)
at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index)
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.ItemCollection.NotifyCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Windows.Controls.ItemCollection.InsertImpl(Int32 index, Object value)
at System.Windows.Controls.ItemCollection.InsertInternal(Int32 index, Object value)
at System.Wi
ndows.PresentationFrameworkCollection`1.Insert(Int32 index, T value)
at Telerik.Windows.Controls.RadPaneGroup.PinPane(RadPane pane)
at Telerik.Windows.Controls.Docking.AutoHideArea.PinPane(RadPane pane)
at Telerik.Windows.Controls.RadDocking.PinPane(RadPane radPane, AutoHideArea area, Boolean stopEvents)
at Telerik.Windows.Controls.RadDocking.RadPane_PinChange(Object sender, PinChangeEventArgs args)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.Dynami
cInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at Telerik.Windows.RadRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at Telerik.Windows.RadRoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.RouteItem.InvokeHandler(RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)
n at Telerik.Windows.EventRoute.InvokeHandlers(Object source, RadRoutedEventArgs args)
at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)
at Telerik.Windows.DependencyObjectExtensions.RaiseEvent(DependencyObject element, RadRoutedEventArgs e)
at Telerik.Windows.Controls.RadPane.OnPinChange(PinChangeEventArgs args)
at Telerik.Windows.Controls.RadPan
e.ChangePin(Boolean isPinned)
at Telerik.Windows.Controls.RadPane.OnIsPinnedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
n 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.RadPane.set_IsPinned(Boolean value)
at PetroWEB.Silverlight.Reports.ReportController.ShrinkOrGrowBottomTabPane()
Here is the RadPane details
OPEN, RIGHT BEFORE setting isPinned = TRUE
{Telerik.Windows.Controls.RadPane}
base {Telerik.Windows.Controls.RadTabItem}: {Telerik.Windows.Controls.RadPane}
AutoHideHeight: 336.0
AutoHideWidth: 853.0
CanDockInDocumentHost: false
CanFloat: false
CanUserClose: false
CanUserPin: false
DocumentHostTemplate: {System.Windows.Controls.ControlTemplate}
IsDockable: true
IsDragging: false
IsFloating: false
IsHidden: false
IsInDocumentHost: false
IsLastInGroup: true
IsPinned: false
MenuCommands: Count = 5
MenuItemTemplate: {System.Windows.DataTemplate}
MenuItemTemplateSelector: null
Title: "DataGrid"
TitleTemplate: null
TitleTemplateSelector: null
CLOSE, RIGHT BEFORE setting isPinned = FALSE
{Telerik.Windows.Controls.RadPane}
base {Telerik.Windows.Controls.RadTabItem}: {Telerik.Windows.Controls.RadPane}
AutoHideHeight: 0.0
AutoHideWidth: 0.0
CanDockInDocumentHost: false
CanFloat: false
CanUserClose: false
CanUserPin: false
DocumentHostTemplate: {System.Windows.Controls.ControlTemplate}
IsDockable: true
IsDragging: false
IsFloating: false
IsHidden: false
IsInDocumentHost: false
IsLastInGroup: false
IsPinned: true
MenuCommands: Count = 5
MenuItemTemplate: {System.Windows.DataTemplate}
MenuItemTemplateSelector: null
Title: "DataGrid"
TitleTemplate: null
TitleTemplateSelector: null
REOPEN, RIGHT BEFORE setting isPinned = TRUE (IT CRASHES RIGHT AFTER THIS)
base {Telerik.Windows.Controls.RadTabItem}: {Telerik.Windows.Controls.RadPane}
AutoHideHeight: 336.0
AutoHideWidth: 853.0
CanDockInDocumentHost: false
CanFloat: false
CanUserClose: false
CanUserPin: false
DocumentHostTemplate: {System.Windows.Controls.ControlTemplate}
IsDockable: true
IsDragging: false
IsFloating: false
IsHidden: false
IsInDocumentHost: false
IsLastInGroup: true
IsPinned: false
MenuCommands: Count = 5
MenuItemTemplate: {System.Windows.DataTemplate}
MenuItemTemplateSelector: null
Title: "DataGrid"
TitleTemplate: null
TitleTemplateSelector: null