Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
[NuGet] Fix file license dialog scrollbar not always enabled
Browse files Browse the repository at this point in the history
When the loading of the file license text happens after the dialog
has been displayed the vertical scrollbar for the rich text view
would not be enabled unless the dialog was resized by the user.
This seems to happen only when using the native toolkit with XWT.
To workaround this the dialog's OnReallocate method is called
when the license text is loaded after the dialog is shown. This
enables the vertical scrollbar if the license text is too long to
be displayed.
  • Loading branch information
mrward committed Jan 23, 2020
1 parent 33b2ae8 commit 227dc6c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ void Build ()
void LicenseFileTextPropertyChanged (object sender, PropertyChangedEventArgs e)
{
LoadText ();

// Need to refresh the dialog after the license text has been loaded. Otherwise when using the
// native toolkit the vertical scrollbar is not enabled unless you re-size the dialog.
OnReallocate ();
}

void LoadText ()
Expand Down

0 comments on commit 227dc6c

Please sign in to comment.