Dialog/Form design doesn't match

Dialog/Form design doesn't match

StormyC
Advocate Advocate
544 Views
4 Replies
Message 1 of 5

Dialog/Form design doesn't match

StormyC
Advocate
Advocate

When using .NET8 / VS2022 and AutoCAD2025 the design for the form doesn't match with the form ultimately displayed in AutoCAD.  Any clues?

I have tried WPF and WinForms, both the same.

0 Likes
Accepted solutions (3)
545 Views
4 Replies
Replies (4)
Message 2 of 5

ActivistInvestor
Mentor
Mentor
Accepted solution

.NET 8 introduces breaking changes in Windows forms sizing/scaling behavior.

 

Have a look at this document.

Message 3 of 5

DYH_
Enthusiast
Enthusiast
Accepted solution

Prefer using WPF, layout and divide with Grid, and do not use mouse dragging to create interface elements.

Message 4 of 5

StormyC
Advocate
Advocate

Interesting - thanks.  I did try to adjust some setting relating to DPI scaling but the issue appears to be:  I created a new WPF Form and the Form controls are present within AutoCAD and not in the designer so this pushes everything down causing the last button to be clipped.  If i add 40px to the bottom of the form it appears OK...

Ive used a fully defined grid now and added elements in .xaml as suggested.  Seems to be working ok.

Thanks both for you inputs.

0 Likes
Message 5 of 5

StormyC
Advocate
Advocate
Accepted solution

Finally found the fix for my particular issue it was a property on the form - this was "Font".  Setting it to None makes the forms appear correct.

StormyC_0-1785757787569.png

 

0 Likes