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

Pin RadPane causes Index out of range error

5 Answers 30 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Harry
Top achievements
Rank 1
Harry asked on 03 Jan 2020, 09:50 PM

Hello,

I have a WPF project where I am using RadDocking with 3 RadPaneGroups. I get an Index out of range error when I pin and then try to unpin a pane or if I try to pin a second item. I am able to set the pane to floatable/dockable and manipulate them that way, but when I try to unpin I get the error. I'd like to note we are targeting framework .Net Core 3.1.

Error Message:

System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')'

This exception was originally thrown at this call stack:
System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
Telerik.Windows.Controls.RadTabControl.RaiseIsSelectedChangedAutomationEvent(System.Windows.DependencyObject, bool)
Telerik.Windows.Controls.RadTabItem.OnIsSelectedChanged(bool, bool)
Telerik.Windows.Controls.RadTabItem.OnIsSelectedPropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, ref System.Windows.EffectiveValueEntry, bool, bool, System.Windows.OperationType)
System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, object, System.Windows.PropertyMetadata, bool, bool, System.Windows.OperationType, bool)
    ...
    [Call Stack Truncated]

Here is my XAML:

01.<telerik:RadDocking Grid.Row="3" BorderThickness="0" HasDocumentHost="False" RetainPaneSizeMode="DockingAndFloating" CanAutoHideAreaExceedScreen="True">
02.            <telerik:RadSplitContainer Orientation="Horizontal">
03.                <!--My Queries-->
04.                <telerik:RadPaneGroup>
05.                    <telerik:RadPane Header="My Queries" CanUserClose="True"  >
06.                        <StackPanel>
07.                            <Border>
08.                                <StackPanel>
09.                                    <TextBlock Text="Query Results" />
10.                                </StackPanel>
11.                            </Border>
12.                        </StackPanel>
13.                    </telerik:RadPane>
14.                </telerik:RadPaneGroup>
15. 
16.                <!--Summary-->
17.                <telerik:RadPaneGroup>
18.                    <telerik:RadPane Header="Summary" CanUserClose="True" >
19.                        <StackPanel Margin="3">
20.                            <TextBlock Text="View Summary" />
21.                        </StackPanel>
22.                    </telerik:RadPane>
23.                </telerik:RadPaneGroup>
24. 
25.                <!--Torge Charts-->
26.                <telerik:RadPaneGroup>
27.                    <telerik:RadPane Header="Torque Charts" CanUserClose="True" >
28.                        <StackPanel Margin="3">
29.                            <TextBlock Text="View Torque Charts" />
30.                        </StackPanel>
31.                    </telerik:RadPane>
32.                </telerik:RadPaneGroup>
33.                 
34.            </telerik:RadSplitContainer>
35.        </telerik:RadDocking>

 

5 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 08 Jan 2020, 01:03 PM

Hello Harry,

Thank you for the provided code snippet and stacktrace. 

I tested the described scenario, however I was not able to replicate the same exception on my end. That is why I am attaching the sample project I used for testing purposes. May I ask you to check it out and see how it differs from the setup on your end?

If you can reproduce the error in the attached project, may I ask you to share a video or sample steps, which I can follow on my end? If I am missing something, may I ask you to modify the project in order to replicate the exception and send it over in a new support ticket (since projects cannot be attached to forum posts)?

Thank you in advance for any help you can provide.

Regards,
Vladimir Stoyanov
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.
0
Harry
Top achievements
Rank 1
answered on 17 Jan 2020, 05:37 PM

Hi Vladimir,

 

Thank you for the sample app. I was able to run it and was not able to replicate my issue. I will begin troubleshooting the differences between the two. I will update once complete.

 

Thanks again,

Harry

0
Harry
Top achievements
Rank 1
answered on 17 Jan 2020, 08:19 PM

Hi Vladimir,

I was able to copy the code in my application and use it in your test app with no issues. I am still, however, having the same issues in my application even when striping it down to match your test app. I believe the only difference at this point are the dependencies. I have attached a screenshot of your dependencies and mine. Could you confirm that this could cause issues and if so, how could I resolve them? I am using the following nugets:

UI.for.Wpf.40.Xaml.Trial
UI.for.Wpf.45.Xaml.Trial
Wpf.NetCore.Xaml.Trial

Thanks,

Harry

0
Vladimir Stoyanov
Telerik team
answered on 21 Jan 2020, 03:41 PM

Hi Harry,

Thank you for the provided pictures. 

Please, allow me to start by saying that the there is no need to add all three nugets (40, 45 and NetCore). The first two contain dlls built against .Net Framework versions 4 and 4.5. Since, you are using .Net Core, you only need the NetCore nuget package. 

That said, the nuget packages just contain the dlls inside them and there shouldn't be any difference between using dlls vs nugets. However, I noticed that in the provided picture the version of the nuget package is 2019.3.1028. In that version, the Telerik .Net Core dlls were still built against .Net Core 3 (and not .Net Core 3.1). Can you give our latest version a try to see, if there is any difference (although I am not sure, if this will help in the specific scenario)?

Should you need any further assistance, may I ask you to share a sample project, where the undesired behavior is replicated? This will allow us to investigate the scenario and further assist you.

Regards,
Vladimir Stoyanov
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.
0
Harry
Top achievements
Rank 1
answered on 23 Jan 2020, 03:45 PM

Hi Vladimir,

I installed the most recent nuget version and that did the trick! Everything is working as desired.

Thanks for your help,

Harry

Tags
Docking
Asked by
Harry
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Harry
Top achievements
Rank 1
Share this question
or