wpfui icon indicating copy to clipboard operation
wpfui copied to clipboard

Poor <Expander> performance

Open LHTXQ opened this issue 3 years ago • 0 comments

Describe the bug
When adding <TextBox> containing a large amount of text to <Expander>, selecting all the text of the <TextBox> or copying all the text would make the app stop responding for a long time

To Reproduce
Steps to reproduce the behavior:

  1. Create an app with:
<Expander VerticalAlignment="Top" VerticalContentAlignment="Top" Margin="20,10,20,0"
                              Background="Transparent" ExpandDirection="Down" IsExpanded="True">
                        <Expander.Header>
                            <TextBlock  Text=" : ( "/>
                        </Expander.Header>
                        <TextBox  IsReadOnly="True" IsReadOnlyCaretVisible="True" Text="{Binding A_lot_of_text,Mode=OneWay}"/>
                    </Expander>
  1. Assign a very long string to A_lot_of_text which was bound to <TextBox>'s Text.
  2. Start the app.
  3. Select all text in <TextBox> or copy all text in <TextBox> Will make the app stop responding for a long time.

Desktop (please complete the following information):

  • OS: [e.g. Windows 11]
  • .NET: [e.g. net6.0]
  • Version: [e.g. 2.0.2]

LHTXQ avatar Aug 06 '22 05:08 LHTXQ