Skip to content

Conversation

@mjkkirschner
Copy link
Member

@mjkkirschner mjkkirschner commented Jan 4, 2019

Purpose

Adds an app config to DynamoCoreWPF assembly which contains a single key. This key is suggested in this discussion: https://developercommunity.visualstudio.com/content/problem/244615/setfinalsizemaxdiscrepancy-getting-stuck-in-an-inf.html

as a workaround to a bug introduced in the .net 4.7 timeframe into wpf grid control.

I verified I could reproduce the bug (which Aparajit initially found on bootcamp) with my VM using a high resolution 3000 x 2000 ish - at 300% scaling.

Adding this switch here or earlier prevents the hang. Using this we lose whatever enhancements were made to grid resizing in .net 4.7 - but I think a scaled laptop display these days is very common - and not hanging is more important.

with app switch false:

falsetest2

with app switch true:

truetest4

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@QilongTang
@aparajit-pratap

FYIs

@Racel @smangarole @Dewb

use config file to set switch
@mjkkirschner mjkkirschner changed the title use app switch to use old wpf grid layout algorithm to avoid hang on scaled displays. [PTAL] use app switch to use old wpf grid layout algorithm to avoid hang on scaled displays. Jan 4, 2019
@mjkkirschner mjkkirschner added the PTAL Please Take A Look 👀 label Jan 4, 2019
@aparajit-pratap
Copy link
Contributor

So you added the config to DynamoCoreWpf and ViewModel since it is related to WPF grids? Minor but you could also add a comment to remind devs to remove the App.config file too once the bug is fixed in .NET 4.7. LGTM.

@QilongTang QilongTang added LGTM Looks good to me and removed PTAL Please Take A Look 👀 labels Jan 7, 2019
@QilongTang QilongTang changed the title [PTAL] use app switch to use old wpf grid layout algorithm to avoid hang on scaled displays. Use app switch to use old wpf grid layout algorithm to avoid hang on scaled displays. Jan 7, 2019
@mjkkirschner mjkkirschner merged commit 3bc698c into DynamoDS:master Jan 7, 2019
mjkkirschner added a commit to mjkkirschner/Dynamo that referenced this pull request Jan 7, 2019
use config file to set switch
mjkkirschner added a commit that referenced this pull request Jan 8, 2019
use config file to set switch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM Looks good to me

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants