Results 1 to 6 of 6

Thread: [RESOLVED] WinForms BeginUpdate() equivalent in WPF?

Threaded View

  1. #6

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    10

    Re: WinForms BeginUpdate() equivalent in WPF?

    Ok, Wow, stupid me....

    What you confirmed is entirely correct, what I forgot to do is to test the whole thing out in a new project in WPF without using a theme... And yeah, I just tried it... and yup, 100 000 items get added to the list in less than 3 seconds without a theme.

    As I mentioned in my first post; I use the Expression Light theme from http://wpf.codeplex.com/wikipage?title=WPF%20Themes

    Now, this means that the problem apparently lies in the theme....





    OK, problem solved....
    Apparently this was the wrong-doer in the Theme:
    Code:
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBox}">
                        <Grid>
                            <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Background="{DynamicResource ControlBackgroundBrush}" />
                            <ScrollViewer Margin="1" Style="{DynamicResource NuclearScrollViewer}" Focusable="false" Background="{x:Null}">
                                <StackPanel Margin="1,1,1,1" IsItemsHost="true" />
                            </ScrollViewer>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                                <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                            </Trigger>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
    I removed that part of the XAML script and now everything works like a charm.

    Thank you VERY MUCH, I freakin' love you =D. No, but seriously, thanks for the help and confirming everything, really appreciate the help you've given me here =).
    Last edited by Lith; May 8th, 2010 at 03:37 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width