Search

Freeze when using VirtualizingPanel.IsVirtualizingWhenGrouping by dialogik

Active

3
0
Sign in
to vote
Type: Bug
ID: 780146
Opened: 2/27/2013 12:40:19 PM
Access Restriction: Public
0
Workaround(s)
2
User(s) can reproduce this bug
If using an Itemscontrol with VirtualizingStackpanel and IsVirtualizingWhenGrouping =true, MouseScroll freezes the application when GroupStyle ControlTemplate does not contain a Expander.

The behavior seams caused by the fact that the Expander Template sets the content-height to the desired height of the containing grid.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

.NET Framework 4.5

Steps to reproduce

take a sample like the one provided here:
http://connect.microsoft.com/VisualStudio/feedback/details/765682/freeze-when-using-virtualizingpanel-isvirtualizingwhengrouping-on-wpf-datagrid

this GroupStyle works:
<GroupStyle x:Key="dsxGrpItm" HidesIfEmpty="True">
        <GroupStyle.ContainerStyle>
            <Style TargetType="{x:Type GroupItem}">
                <Setter Property="Margin" Value="0"/>
                <Setter Property="SnapsToDevicePixels" Value="true"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type GroupItem}">
                            <Expander IsExpanded="True" BorderBrush="#FFA4B97F" BorderThickness="0,0,0,1">
                                <Expander.Header>
                                    <DockPanel>
                                        <TextBlock FontWeight="Bold" Text="{Binding Path=Name}" Margin="5,0,0,0" Width="100"/>
                                        <TextBlock FontWeight="Bold" Text="{Binding Path=ItemCount}"/>
                                    </DockPanel>
                                </Expander.Header>
                                
                                <Expander.Content>
                                    <StackPanel>
                                        <Grid Height="20" Background="YellowGreen">
                                        </Grid>
                                        <ItemsPresenter>
                                        </ItemsPresenter>
                                        <Grid Height="20" Background="DarkGreen">
                                        </Grid>
                                    </StackPanel>
                                </Expander.Content>
                            </Expander>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </GroupStyle.ContainerStyle>
    </GroupStyle>

this GroupStyle freezes:
(basically just the Expander-Content)
<GroupStyle x:Key="dsxGrpItm" HidesIfEmpty="True">
        <GroupStyle.ContainerStyle>
            <Style TargetType="{x:Type GroupItem}">
                <Setter Property="Margin" Value="0"/>
                <Setter Property="SnapsToDevicePixels" Value="true"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type GroupItem}">
                                    <StackPanel>
                                        <Grid Height="20" Background="YellowGreen">
                                        </Grid>
                                        <ItemsPresenter>
                                        </ItemsPresenter>
                                        <Grid Height="20" Background="DarkGreen">
                                        </Grid>
                                    </StackPanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </GroupStyle.ContainerStyle>
    </GroupStyle>

Using a DockPanel, StackPanel or Grid as container does reproduce the List to freeze on MouseScroll.

Product Language

English

Operating System

Windows 7 SP1

Operating System Language

English

Actual results

application freezes (does not respond)

Expected results

application should scroll the list
File Attachments
0 attachments
Sign in to post a comment.
Posted by James079 on 3/12/2013 at 8:25 AM
I had already posted this bug before. I just didn't know it's got to do with ControlTemplate not containing an expander. Glad someone else pointed it out. I don't know how this bug went omitted for so long.
It's like WPF 4.5 is in total abandonship. Pity.
Posted by Microsoft on 2/27/2013 at 9:32 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 2/27/2013 at 12:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.