Dockable Pane page size?

Dockable Pane page size?

Anonymous
Not applicable
2,352 Views
6 Replies
Message 1 of 7

Dockable Pane page size?

Anonymous
Not applicable

Hi,

 

My WPF Page doesnt "anchor" to the right and botton edge of the dockable pane.

It works flawlessly on my testbench which is a WPF Window and I just assign an instance of my derived page class to the content property of the Window and it just works.

 

I have a treeview that is stretchable to the right and bottom and I can never see the end of it (no scrollbar, which is very annoying). No matter how I flex the dockable pane.

One solution is to set the size to fixed, but that just doesnt seem right...

 

Any ideas?

 

Thanks

 

/Erik

 

Edit: I just added a scrollbar to the page and with that I adjust the right border of the treeview. I can get it go exactly where I want to be, but when I resize the dockable pane it seems like the border adjusts unproportional so that if I decrease the width of the dockable pane my border increases and the opposite.

Furthermore I checked the size that the page thinks it has during runtime and if I set the width of the dockable pane to where I know what I should have as width I get 550 pixels, but In the editor in visual studio the width should be 370. So it thinks its much wider than it is.
This could be me not understanding the workings of WPF Page, but it seems like its working flawlessly in a Window. Is there something special you need to do to get it to figure out the correct width?

0 Likes
Accepted solutions (1)
2,353 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Accepted solution

Ok,

I fixed it.
This goes out to all of you with high resolution screens using the enlarge (I dont know what its called in the english version of windows 8, see that attached image):
Using anything else than 100% will not work well with Revit.


When I first got my new laptop I set it to 200% and Revit just didnt work at all, the UI was all messed up. So I found a post saying that Revit would not work above 150% percent, and everything does work with 150%, execpt dockable panes.

 

If you set it to 100% the dockable pane performs exactly like it should.

 

Or has anyone found another solution?

 

/Erik

0 Likes
Message 3 of 7

daniel
Enthusiast
Enthusiast

Just to raise this again. 

 

I have the same issue on my controller which is hosted inside a dockable panel.. When using anything other than 100 % it's just messes things up. 

 

This should be filed as an bug, if its not done yet. 

 

Scaling needs to work. 

 

Is this a problem because Revit internaly uses Windows Forms ???

 

 

0 Likes
Message 4 of 7

Anonymous
Not applicable

I agree.
Its annoying to have 3K laptop screen at 2K just because you cant see anything at 3K 100%.
Is Revit windows forms? I dont think so, digging in the AdWindows.dll sure does not look like it.

 

 

0 Likes
Message 5 of 7

daniel
Enthusiast
Enthusiast

I don't think so, but for me it seems as one off the obvious solutions to why scaling should not work.. It is known to be problematic in Win forms..

 

 

0 Likes
Message 6 of 7

jordanmarr
Enthusiast
Enthusiast

I have a client who was having the same problem with Revit 2016 and 2017 and 4K monitors.  NOTE: This problem is fixed for Revit 2018 and later.

In case anyone else is still plagued by this issue, here are the steps he used to resolve it:

1) Go to Advanced Scaling Settings and check "Let Windows try to fix apps so they're not blurry"

2) Restart PC

3) Profit

 

 

0 Likes
Message 7 of 7

Anonymous
Not applicable

I recently ran into this problem, and neither changing the display scale to 100% nor enabling "Let Windows try to fix apps so they're not blurry" had any effect. Does anyone have another solution for this? I tested it in Revit 2019, and it works fine, so I think that it's the same issue that was discussed here earlier. 

0 Likes