Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Distinction Between Height and MaxHeight #394

Open
chaojian-zhang opened this issue Mar 23, 2023 · 2 comments
Open

No Distinction Between Height and MaxHeight #394

chaojian-zhang opened this issue Mar 23, 2023 · 2 comments

Comments

@chaojian-zhang
Copy link

Scenario: Want TextEdit to automatically grow in height until it hits a maximum height, then it should show vertical scroll bar instead of keep growing height.

Observation: Absolutely not possible.

Expectation: If I were using a regular WPF TextBox, all I need to do is to set a MaxHeight and VerticaScrollBarVisibility as Auto.

Issue: Setting either Height or MaxHeight for TextEdit causes the control to have a fixed height.

@chaojian-zhang
Copy link
Author

chaojian-zhang commented Mar 23, 2023

A workaround for this problem is to wrap the Text Editor inside a Border, and set MaxHeight for the Border instead.

@ApokalmiX
Copy link

Even with your workaround I still have this behavior.
It seems to come from the ShowLineNumbers property because when this function is disabled, the control behaves normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants