1
Vote

CustomGridSplitter crash

description

I'm using a custom gridsplitter in the Windows 10 UWP and runtime when I'm dragging the splitter this exception occurs:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
at System.Runtime.InteropServices.WindowsRuntime.VectorToListAdapter.Indexer_Get[T](Int32 index)
at WinRTXamlToolkit.Controls.CustomGridSplitter.ResizeColumns(Grid grid, Double deltaX)
at WinRTXamlToolkit.Controls.CustomGridSplitter.ContinueDirectDragging(Point position)
at WinRTXamlToolkit.Controls.CustomGridSplitter.OnPointerMoved(PointerRoutedEventArgs e)
                <Grid Grid.Row="1" Grid.Column="1" Height="50" VerticalAlignment="Top" Margin="10,0" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Border Grid.Column="0" >
                        <TextBlock  Grid.Column="0" Text="Name" />
                    </Border>
                    <controls:CustomGridSplitter CanDrag="True" ResizeDirection="Columns" ShowsPreview="True"/>
                    <controls:CustomGridSplitter Grid.Column="1" CanDrag="True" ResizeDirection="Columns" ShowsPreview="True"/>
                    <Border Grid.Column="1" >
                        <TextBlock  Grid.Column="1" Text="text" />
                    </Border>
                    <Border Grid.Column="2" >
                    <TextBlock  Grid.Column="2" Text="text" />
                        </Border>
                    <Border Grid.Column="3" >
                        <TextBlock Grid.Column="3" Text="text" />
                    </Border>
                    <Border Grid.Column="4" >
                        <TextBlock  Grid.Column="4" Text="text" />
                    </Border>
                </Grid>

comments