Out of range exception when virtualizing PropertyGrid

Grids for WPF Forum

Posted 12 years ago by Pat Maneely - Software Engineering Manager, Cobham Aerospace
Version: 11.1.0545
Platform: .NET 3.5
Environment: Windows 7 (32-bit)

I seem to be having a strange problem with the PropertyGrid when using the VirtualizingStackPanel class.  The propertygrid is inside a Grid, which itself is inside a (actipro) wizard page (see below):

<wizard:WizardPage x:Name="msmFSPPage"  PageType="Interior"
                   Caption="Flexcomm System Configuration Parameters"
                   Description="This page contains the Parameters necessry to configuration Flexcomm System" 
                   Title="Flexcomm System Configuration Parameters Page"
                   NextButtonEnabled="{Binding Path=FlexCommSysData.P25CapableSystem}">
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        <Label Content="Configuration Name" Height="23.277" VerticalAlignment="Top" />
        <TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" 
                 MaxLines="1" Margin="-75,0,0,0" HorizontalAlignment="Stretch" Width="Auto" 
                 Text="{Binding Path=FlexCommSysData.Name}"/>

        <propgrid:PropertyGrid Name="fctSysDataPG" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" 
                               Width="Auto" Height="450"
                               <!-- VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" -->
                               SelectedObject="{Binding Path=FlexCommSysData}">
                <Style x:Key="{x:Type propgrid:PropertyGridDataAccessorItem}" TargetType="{x:Type propgrid:PropertyGridDataAccessorItem}"
                       BasedOn="{StaticResource fctSysDataPgStyle}" />
                <RpWin:CustomDataFactory />

 The problem is that when anything is modified on the wizard page, when 'Next' is clicked to go onto the next page the dialog box this is all in throws a whole bunch of exceptions (which in this particular application pop up as little windows) saying "Specified argument was out of range of valid values.  Parameter name: index".

It actually continues throwing them, filling the screen with little windows, until you kill the application.  Removing the VirtualizingStackPanel line (that I've commented out above) resolves the issue and everything works as expected.  I don't know if this is something I'm doing wrong or some sort of bug in the propertygrid.  There really aren't very many entries in any of these wizard pages, so there's probably not much to be gained by virtualizing anyways, but it'd be nice to know what's causing this.  Thanks! 

Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Pat,

We tried unsuccessfully to recreate this issue. If you can please put together a small/complete sample project that reproduces your issue and email it over then we can take a closer look. Be sure to remove any executables or change the extension of the zip file to ensure it gets past our email filters.

Actipro Software Support

Posted 12 years ago by Pat Maneely - Software Engineering Manager, Cobham Aerospace

Thanks for looking into it, I will see about putting something together as time permits.  Beings we have a workaround, this isn't a real high priority. 

The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.