C
C#11mo ago
!Rushaan

Grid not resizing its child elements WPF

https://pastebin.com/MqM8XZCH As seen in the image i want the elements to proportionally adapt in size when the window is resized
No description
No description
14 Replies
SG97
SG9711mo ago
you need to stop using margins as a way of positioning controls and instead use rows/columns that adapt to the grids size
!Rushaan
!RushaanOP11mo ago
does that mean i need to create rows and columns for each element ?
SG97
SG9711mo ago
not necessarily
Sir Rufo
Sir Rufo11mo ago
A ViewBox may help
SG97
SG9711mo ago
for columns (to start with)
No description
SG97
SG9711mo ago
for rows (to start with)
No description
SG97
SG9711mo ago
that slider maybe needs it's own column
!Rushaan
!RushaanOP11mo ago
Hmm whys that, doesnt it come under row 1 column 1? Ah yes it fixed it, tysm but now im wondering why are there more ways of achieving responsive layout if viewbox does the job so easily
Sir Rufo
Sir Rufo11mo ago
It depends what you want to achieve
!Rushaan
!RushaanOP11mo ago
I see
Sir Rufo
Sir Rufo11mo ago
If you have a list showing 10 rows it will even show 10 rows when maximized with a viewbox
!Rushaan
!RushaanOP11mo ago
sooo, isnt that a good thing
Sir Rufo
Sir Rufo11mo ago
It depends
!Rushaan
!RushaanOP11mo ago
oo
Want results from more Discord servers?
Add your server