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

Make the "Encapsulate Field" Preview Window Bigger #5200

Closed
CHR-IS-B opened this issue Oct 8, 2019 · 5 comments · Fixed by #5227
Closed

Make the "Encapsulate Field" Preview Window Bigger #5200

CHR-IS-B opened this issue Oct 8, 2019 · 5 comments · Fixed by #5227

Comments

@CHR-IS-B
Copy link

@CHR-IS-B CHR-IS-B commented Oct 8, 2019

Justification
The "Encapsulate Field" preview window is too small to show a 3 line Get, 3 line Let and 1 line variable declaration. There are no scroll bars on the window so it looks like all visible text is displayed when in fact some of it is hidden

Description
Add scroll bars, and/or make the initial window size bigger : )

Initial View
-It looks like the result will only create a property-get and won't honor the setter type check boxes.
Capture1

Expanded View (after clicking the Expand/Collapse button twice)
-Ah! Now I can see what Rubberduck is going to do and just how awesome it is! Let's make this preview window this size by default.
Capture2

@Vogel612

This comment has been minimized.

Copy link
Member

@Vogel612 Vogel612 commented Oct 9, 2019

This should be fixable by adjusting some size-related properties on the BindableTextEditor control included in the EncapsulateFieldView.xaml here:

<controls:BindableTextEditor Margin="10,10,10,10"
FontFamily="Courier New "
ShowLineNumbers="False"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Disabled"
IsReadOnly="True"
Text="{Binding PropertyPreview,Mode=OneWay}"/>

The control exposes all properties that AvalonEdit's TextEditor already exposes, which includes MinHeight and Height both inherited from the Control class. Adding a sensible MinHeight should fix this issue

@retailcoder

This comment has been minimized.

Copy link
Member

@retailcoder retailcoder commented Oct 9, 2019

I agree with the resizing, and I'd say there should be scrollbars if there's more content than what's shown.

@retailcoder

This comment has been minimized.

Copy link
Member

@retailcoder retailcoder commented Oct 9, 2019

Great issue BTW, thanks for opening this!

@CHR-IS-B

This comment has been minimized.

Copy link
Author

@CHR-IS-B CHR-IS-B commented Oct 9, 2019

: )

@IvenBach

This comment has been minimized.

Copy link
Member

@IvenBach IvenBach commented Oct 9, 2019

This is a great 01-duckling issue. Vogel's already laid the trail of breadcrumbs out. If you have any more questions :hint: :hint: we're happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.