wpfui
wpfui copied to clipboard
Poor <Expander> performance
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:
- 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>
- Assign a very long string to
A_lot_of_textwhich was bound to<TextBox>'s Text. - Start the app.
- 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]